#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int cnt = 0;
  int i = 0;
  while (s[i] == '<') {
    cnt++;
    i++;
  }
  if (i < (int)s.size()) {
    i = (int)s.size() - 1;
    while (s[i] == '>') {
      cnt++;
      i--;
    }
  }
  cout << cnt << endl;
}
