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