#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  string a;
  for (int i = 0; i < n; i++) {
    cin >> a;
  }
  int i = 0;
  int aux = 0;
  long long cant = 0;
  while (i < n && a.at(i) == '<') {
    cant++;
    i++;
  }
  while (i < n) {
    if (a.at(i) == '>') {
      aux++;
    } else {
      aux = 0;
    }
    i++;
  }
  cant = cant + aux;
  cout << cant << endl;
}
