#include <bits/stdc++.h>
int main() {
  int con;
  int t;
  while (scanf("%d", &t) == 1) {
    char c[300000];
    int total, temp = t;
    int fall = 0, go = 0, backk = 0, poss = 0;
    scanf("%s", c);
    for (int i = 0; i < t; i++) {
      if (c[i] == '<') {
        backk++;
        if (go == 0) fall++;
        poss = 0;
      } else if (c[i] == '>') {
        go++;
        poss++;
      }
    }
    fall += poss;
    printf("%d\n", fall);
  }
}
