Example

Input

7
>>


Output

7
#include <bits/stdc++.h>

using namespace std;

int main() {
  int n; cin >> n;
  string s; cin >> s;
  int i,a1=0,a2=0;
  for(i=0;i<n;++i)
    if(s[i]=='>') break;
  a1=i;
  for(i=n-1;i>=0;--i)
    if(s[i]=='<') break;
  a2=n-i-1;
  cout << n-min(a1,a2) << endl;
  
  return 0;
}
