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