Example

Input

7
>>


Output

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

int main()
{
	int N;
	string s;
	cin >> N >> s;
	int l = 0, r = 0;
	while (s[l] == '<') l++;
	while (s[N - r - 1] == '>') r++;
	cout << N - min(l, r) << endl;
	return 0;
}