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