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