#include <bits/stdc++.h>
int main() {
  int a, c, i, j;
  char d[200000];
  while (~scanf("%d", &a)) {
    c = 0;
    scanf("%s", &d);
    for (i = 0; i < a; i++) {
      if (d[i] == '<')
        c++;
      else
        break;
    }
    for (i = a - 1; i >= 0; i--) {
      if (d[i] == '>')
        c++;
      else
        break;
    }
    printf("%d\n", c);
  }
  return 0;
}
