#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  string B;
  cin >> B;
  int cnt = 0;
  for (int i = 0; i < N; ++i) {
    if (B[i] == '>') break;
    ++cnt;
  }
  for (int i = N - 1; i >= 0; --i) {
    if (B[i] == '<') break;
    ++cnt;
  }
  cout << cnt << endl;
}
