Example

Input

7
>>


Output

7
#include <iostream>
#include <queue>
#include <cstring>
#include <stdio.h>
#include <string>
#include <vector>
#include <algorithm>
#include <limits.h>
using namespace std;
typedef vector<int> vi;
typedef long long ll;
typedef long long ll;
typedef vector<ll> vll;
const int inf=10000000;
int n;
string s;
int rights[100005];
int lefts[100005];
typedef pair<int,int> P;
typedef pair<int,pair<int,int> > PP;
int rans=0;
int lans=0;
int main(int argc,char const* argv[])
{
  cin >> n;
  cin >> s;
  bool right=false;
  bool left=false;
  for(int i=0;i<int(s.size());i++)
    {
      if(s[i]=='>' && !right)
	{
	  rans++;
	  right=true;
	}
      else if(right)
	{
	  rans++;
	}
    }
  for(int i=int(s.size()-1);i>=0;i--)
    {
      if(s[i]=='<' && !left)
	{
	  lans++;
	  left=true;
	}
      else if(left)
	{
	  lans++;
	}
    }
  cout << max(lans,rans) << endl;
  return 0;
}

