Example

Input

7
>>


Output

7
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
 
using ll=long long;
 
 
int main(void){
	int n;
	string s;
	cin >> n >> s;
	int left=-1,right=n;
	rep(i,n){
		if(s[i]=='>') right=min(right,i);
		if(s[i]=='<') left=max(left,i);
	}
	// cerr << left << " " << right << endl;
	int ans=left-right+1;
	cout << ans+max(n-1-left,right) << endl;
	return 0;
}	