Example

Input

7
>>


Output

7
#include <cstdio>
#include <algorithm>
using namespace std;
int n,i;
char s[100050];
int main()
{
	scanf("%d",&n);
	scanf("%s",s);int cnt1=0,cnt2=0;
	for (i=0;i<n;i++) if (s[i]=='>') break;else cnt1++;
	for (i=n-1;i>=0;i--) if (s[i]=='<') break;else cnt2++;
	printf("%d\n",n-min(cnt1,cnt2));
	return 0;
}
