Example

Input

7
>>


Output

7
#include <iostream>
using namespace std;
int main(){
  int N;
  cin >> N;
  string S;
  cin >> S;
  int l = 0, r = N-1;
  while(S[l] == '<') ++l;
  while(S[r] == '>') --r;
  cout << N - min(l,N-1-r) << endl;
  return 0;
}