#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int n;
  cin >> n >> s;
  int count = 0;
  int l = 0;
  while (s[l] != '>' && l < n) {
    count++;
    l++;
  }
  int r = n - 1;
  while (s[r] != '<' && r >= 0) {
    count++;
    r--;
  }
  cout << count;
  return 0;
}
