Example

Input

7
>>


Output

7
#define _USE_MATH_DEFINES
 
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
 
using namespace std;
 
typedef pair<long long int, long long int> P;
long long int INF = 1e18;

int main(){
	
	int N;
	cin >> N;
	
	string str;
	cin >> str;
	
	int cnt1 = 0, cnt2 = 0;
	
	for(int i = 0; i < N; i++){
		if(str[i] == '<'){
			cnt1++;
		}else{
			break;
		}
	}
	
	for(int i = 0; i < N; i++){
		if(str[N - i - 1] == '>'){
			cnt2++;
		}else{
			break;
		}
	}
	
	cout << N - min(cnt1, cnt2) << endl;
	
	return 0;
}
