#include <bits/stdc++.h>
char pin[200000 + 10] = {0};
int main() {
  int n, i;
  int pl, pr;
  scanf("%d", &n);
  pin[0] = getchar();
  for (i = 1; i <= n; i++) scanf("%c", &pin[i]);
  i = 1;
  while (pin[i] == '<') i++;
  pl = i - 1;
  i = n;
  while (pin[i] == '>') i--;
  pr = i + 1;
  printf("%d\n", pl + n - pr + 1);
  return 0;
}
