Example

Input

7
>>


Output

7
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define MAX_N 40
#define INF 1000000
#define MOD 1000000007
using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int n;
string str;

int main(){
    cin >> n >> str;
    int ans = 0, cnt = 0;
    rep(i,str.size()){
        if(str[i] == '<') cnt++;
        else break;
    }
    ans = n-cnt;
    cnt = 0;
    for(int i = str.size()-1; i >= 0; i--){
        if(str[i] == '>') cnt++;
        else break;
    }
    ans = max(ans,n-cnt);
    cout << ans << endl;
}