#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, flag, count = 0;
  string s;
  cin >> n;
  cin >> s;
  int i = 0;
  while (s[i] != '>' && i < n) {
    count++;
    i++;
  }
  i = n - 1;
  while (s[i] != '<' && i >= 0) {
    count++;
    i--;
  }
  cout << count << endl;
}
