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