Example

Input

7
>>


Output

7
#include <bits/stdc++.h>
using namespace std;
int main(){
	int n,i,j;
	string s;
	cin>>n>>s;
	for(i=0;i<n;i++)if(s[i]=='>')
		for(j=n-1;j>=0;j--)if(s[j]=='<')goto L;
	L:cout<<n-min(i,n-j-1)<<endl;
}