#include <bits/stdc++.h>
using namespace std;
int n, i, ans;
int main() {
  char q[500000];
  cin >> n >> q;
  while (i < n && q[i] == '<') ans++, i++;
  while (n-- && q[n] == '>') ans++;
  cout << ans;
  return 0;
}
