#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char s[n];
  cin >> s;
  int left = 0, right = n - 1;
  while (left < n && s[left] == '<') left++;
  while (right >= 0 && s[right] == '>') right--;
  cout << left + (n - 1 - right);
  return 0;
}
