#include <bits/stdc++.h>
using namespace std;
int D[20][20];
int n, m;
int main() {
  string str;
  int n;
  cin >> n;
  cin >> str;
  int answ = 0;
  for (int i = 0; i < str.length(); i++) {
    if (str[i] != '<') break;
    answ++;
  }
  for (int i = str.length() - 1; i >= 0; i--) {
    if (str[i] != '>') break;
    answ++;
  }
  cout << answ;
}
