Example

Input

7
>>


Output

7
#include <bits/stdc++.h>
using namespace std;
int n;
string mp;

int main(){
  cin>>n>>mp;
  int a=0,b=0;
  while(mp[a]=='<')a++;
  while(mp[n-1-b]=='>')b++;
  cout <<n-min(a,b)<<endl;
  return 0;
}