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