#include <bits/stdc++.h>
using namespace std;
int main() {
  int count = 0, n;
  char* s;
  cin >> n;
  s = new char[n];
  for (int i = 0; i < n; ++i) cin >> s[i];
  int i = 0;
  while ((s[i] == '<') && (i < n)) {
    ++count;
    ++i;
  }
  i = n - 1;
  while ((s[i] == '>') && (i >= 0)) {
    ++count;
    --i;
  }
  cout << count << endl;
  return 0;
}
