#include <bits/stdc++.h>
int main() {
  int n, count = 0;
  scanf("%d", &n);
  getchar();
  char s[200000];
  gets(s);
  int flag = -1, fis = 0;
  char c;
  c = s[0];
  if (c == '>') {
    for (int i = n - 1; i >= 0; i--) {
      if (s[i] == '>')
        count++;
      else
        break;
    }
  } else {
    for (int i = 0; i < n; i++) {
      if (s[i] == '<')
        count++;
      else
        break;
    }
    if (count < n) {
      for (int j = n - 1; j >= 0; j--) {
        if (s[j] == '>')
          count++;
        else
          break;
      }
    }
  }
  printf("%d", count);
  return 0;
}
