#include <bits/stdc++.h>
int n;
char str[250000];
int main() {
  while (~scanf("%d", &n)) {
    scanf("%s", str);
    int len = strlen(str);
    int sum1 = 0, sum2 = 0;
    for (int i = 0; i < len; i++) {
      if (str[i] == '<') {
        sum1++;
      } else {
        break;
      }
    }
    for (int i = len - 1; i >= 0; i--) {
      if (str[i] == '>') {
        sum2++;
      } else {
        break;
      }
    }
    printf("%d\n", sum1 + sum2);
  }
  return 0;
}
