Example

Input

7
>>


Output

7
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;

using lint = long long;
using ldouble = long double;

int main() {
    int N;
    string S;
    cin >> N >> S;

    int fore;
    for (fore = 0; fore < N && S[fore] == '<'; ++fore) {}

    int back;
    for (back = 0; back < N && S[N - back - 1] == '>'; ++back) {}

    cout << N - min(fore, back) << endl;
    return 0;
}

