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