#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  vector<char> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int res = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] == '>') break;
    ++res;
  }
  for (int i = n - 1; i >= 0; --i) {
    if (a[i] == '<') break;
    ++res;
  }
  cout << res << endl;
}
