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