Example

Input

7
>>


Output

7
#include <iostream>
#include <string>
using namespace std;

int N;
string S;
int main() {
  cin >> N >> S;
  int firstRight = N, lastLeft = -1;
  for (int i = 0; i < N; ++i) {
	if (S[i] == '>') firstRight = min(firstRight, i);
	else lastLeft = max(lastLeft, i);
  }
  int res = 0;
  if (firstRight < N) res = max(res, N - firstRight);
  if (lastLeft > -1) res = max(res, lastLeft + 1);
  cout << res << endl;
}
