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