#include <bits/stdc++.h>
using namespace std;
const int MAXN = 212345;
const int INF = 0x3f3f3f3f;
const long long MOD = 1000000007;
int n;
string a;
int main() {
  cin >> n;
  cin >> a;
  if (a[0] == '>' && a[n - 1] == '<') {
    puts("0");
    return 0;
  } else {
    int resp = 0;
    if (a[0] == '<')
      for (int i = 0; i < n && a[i] == '<'; i++) resp++;
    if (a[n - 1] == '>')
      for (int i = n - 1; i >= 0 && a[i] == '>'; i--) resp++;
    cout << resp << endl;
    return 0;
  }
}
