#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  auto ss = s;
  ss.erase(unique(begin(ss), end(ss)), end(ss));
  if (ss.size() == 1) {
    cout << n << endl;
    return 0;
  }
  int ans = 0;
  for (int i = 0; i < n && s[i] == '<'; i++) ans++;
  for (int i = n - 1; i >= 0 && s[i] == '>'; i--) ans++;
  cout << ans << endl;
  return 0;
}
