#include <bits/stdc++.h>
using namespace std;
int done[200005];
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ans = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '<') {
      ans++;
      done[i] = 1;
    } else {
      break;
    }
  }
  for (int i = s.length() - 1; i >= 0; i--) {
    if (s[i] == '>') {
      if (done[i] == 0) ans++;
      done[i] = 1;
    } else {
      break;
    }
  }
  printf("%d\n", ans);
}
