#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  scanf("%lld", &n);
  string s;
  cin >> s;
  long long cnt = 0;
  long long i = 0;
  while (i < n) {
    if (s[i] == '>') {
      break;
    }
    i++;
    cnt++;
  }
  long long x = 0;
  for (long long j = i; j < n; j++) {
    if (s[j] == '>') {
      x++;
    } else {
      x = 0;
    }
  }
  cnt += x;
  cout << cnt << endl;
}
