#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, num, res = 0, L;
  string s;
  cin >> num >> s;
  L = s.size();
  for (i = 0; i < L; i++) {
    if (s[i] == '>') break;
    res++;
  }
  for (i = L - 1; i >= 0; i--) {
    if (s[i] == '<') break;
    res++;
  }
  cout << res << endl;
  return 0;
}
