Example

Input

7
>>


Output

7
#include <bits/stdc++.h>
#define ll long long
using namespace std;

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