Example

Input

7
>>


Output

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

using namespace std;

int main()
{
  int N; cin >> N;
  string S; cin >> S;
  int l = 0, r = 0;
  while(l < N && S[l] == '<') l++;
  while(r < N && S[N-1-r] == '>') r++;
  cout << N - min(l, r) << endl;
  return 0;
}