Example

Input

7
>>


Output

7
#include <bits/stdc++.h>
using namespace std;
int n; string s;
int main() {
	cin >> n >> s;
	int p = 0, q = 0;
	while(p < n && s[p] == '<') p++;
	while(q < n && s[n - q - 1] == '>') q++;
	cout << n - min(p, q) << endl;
	return 0;
}