Example

Input

7
>>


Output

7
#include<bits/stdc++.h>
using namespace std;
#define DEKAI 1000000007
#define INF (1<<28)
#define lp(i,n) lps(i,0,n)
#define lps(i,j,n) for(int i=j;i<n;i++)
#define FDST int hogehogehoge;cin>>hogehogehoge

int main(){
  int n,rc=0,lc=0;
  string s;
  cin>>n>>s;
  if(s[0]=='>' || s[s.size()-1]=='<') cout<<n<<endl;
  else{
    for(int i=0;i<s.size();i++){
      if(s[i]=='<') rc++;
      else break;
    }
    for(int i=s.size()-1;i>=0;i--){
      if(s[i]=='>') lc++;
      else break;
    }
    cout<<n-min(lc,rc)<<endl;
  }
  return 0;
}

