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