#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, j1;
  cin >> n;
  string str;
  cin >> str;
  i = 0;
  while (str[i] == '<') i++;
  j = n - 1;
  j1 = 0;
  while (str[j] == '>') {
    j--;
    j1++;
  }
  cout << i + j1 << endl;
  return 0;
}
