#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, z = 0;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '<') {
      z++;
    }
    if (s[i] == '>') {
      break;
    }
  }
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '>') {
      z++;
    }
    if (s[i] == '<') {
      break;
    }
  }
  cout << z << endl;
  return 0;
}
