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 = N - 1;
    for(;l < N && s[l] == '<'; l++);
    for(;r >= 0 && s[r] == '>'; r--);
    r = N - 1 - r;
    cout << N - l - r + max(l, r) << endl;
    
    return 0;
}

