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