#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, n, c = 0;
  cin >> n;
  char a[n + 1];
  cin >> a;
  for (i = 0; i < n; i++) {
    if (a[i] == '<')
      c++;
    else
      break;
  }
  for (i = n - 1; i >= 0; i--) {
    if (a[i] == '>')
      c++;
    else
      break;
  }
  cout << c;
}
