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