Example

Input

7
>>


Output

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

using namespace std;

int main()
{
  int N;
  string S;

  cin >> N;
  cin >> S;

  int A = 0, B = 0;
  for(int i = 0; i < S.size(); i++) {
    if(S[i] == '<') ++A;
    else break;
  }
  for(int i = S.size() - 1; i >= 0; i--) {
    if(S[i] == '>') ++B;
    else break;
  }
  cout << N - min(A, B) << endl;
}