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