#include <bits/stdc++.h>
using namespace std;
ifstream file("input.txt");
int main() {
  int n, m = 0;
  string str;
  cin >> n >> str;
  for (int i = 0; i < n; i++) {
    if (str[i] == '<')
      m++;
    else
      break;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (str[i] == '>')
      m++;
    else
      break;
  }
  cout << m;
}
