#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, pos, cnt = 0, cnt1 = 0;
  bool flag_right = false;
  char ch;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf(" %c", &ch);
    if (ch == '<') {
      if (!flag_right) cnt++;
      if (cnt1 != 0) cnt1 = 0;
    } else {
      flag_right = true;
      cnt1++;
    }
  }
  cnt += cnt1;
  printf("%d\n", cnt);
}
