#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt;
  int ans, n;
  while (~scanf("%d", &n)) {
    char s;
    cnt = ans = 0;
    int i;
    getchar();
    for (i = 0; i < n; i++) {
      scanf("%c", &s);
      if (s == '>') {
        cnt++;
        break;
      }
      ans++;
    }
    i++;
    for (; i < n; i++) {
      scanf("%c", &s);
      if (s == '<') {
        cnt = 0;
      } else
        cnt++;
    }
    cout << ans + cnt << endl;
  }
}
