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