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