#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> s;
  int l = 0, r = n - 1, res = 0;
  while (l < n and s[l] == '<') {
    l++;
    res++;
  }
  while (r >= 0 and s[r] == '>') {
    res++;
    r--;
  }
  cout << res;
}
