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