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