Example

Input

7
>>


Output

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

int main(void) {
    
    int n; cin >> n;
    string line; cin >> line;
    int l = 0, r = 0;
    for(int i = 0; line[i] == '<'; i++){
        l++;
    }

    for(int i = n-1; line[i] == '>'; i--){
        r++;
    }
    cout << n - min(r, l) << endl;
    return 0;
}