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