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