Example

Input

7
>>


Output

7
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <bitset>
#include <climits>
#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define RFOR(i,a,b) for (int i=(a)-1;i>=(b);i--)
#define ll long long
#define ull unsigned long long
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const int INF = 1e9;
const int MOD = 1e9 + 7;

using namespace std;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
	int n;
	string s;cin>>n>>s;
	int out_min = 0;
	int ct = 0;
	REP(i,n)
		if(s[i] == '<')ct++;
		else break;
	out_min = ct;ct=0;
	RREP(i,n)
		if(s[i] == '>')ct++;
		else break;
	out_min = min(out_min,ct);
	cout << n - out_min << endl;
  return 0;
}