Example

Input

7
>>


Output

7
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;
	
	string S;
	cin >> S;
	
	int i = 0, j = n;
	while (i < n && S[i] == '<') ++i;
	while (j > 0 && S[j-1] == '>') --j;
	
	cout << n - min(i, n - j) << endl;
}