Example

Input

7
>>


Output

7
#include "bits/stdc++.h"

using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

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