#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using intpair = pair<int, int>;
using llpair = pair<ll, ll>;
using ld = long double;
int main() {
  int N;
  string s;
  cin >> N;
  cin >> s;
  int l = 0, r = 0;
  bool flag = true;
  for (int i = 0; i < N; i++) {
    if (s[i] == '>') {
      flag = false;
      r++;
    } else {
      if (flag) {
        l++;
      } else {
        r = 0;
      }
    }
  }
  cout << r + l;
}
