#include <bits/stdc++.h>
using namespace std;
int n, i, ans;
int main() {
  char a[500000];
  cin >> n;
  cin >> a;
  while (i < n && a[i] == '<') ans++, i++;
  while (n-- && a[n] == '>') ans++;
  cout << ans;
}
