#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, cou;
  char ar[200009];
  while (scanf("%d", &n) == 1) {
    getchar();
    gets(ar);
    int l = strlen(ar);
    cou = 0;
    for (i = 0; i < l; i++) {
      if (ar[i] == '>') break;
      cou++;
    }
    for (i = l - 1; i >= 0; i--) {
      if (ar[i] == '<') break;
      cou++;
    }
    printf("%d\n", cou);
  }
  return 0;
}
