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