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