#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int i, n;
  while (scanf("%d", &n) != EOF) {
    int ans = 0;
    cin >> s;
    for (i = 0; i < s.size(); i++) {
      if (s[i] == '<')
        ans++;
      else
        break;
    }
    for (i = s.size() - 1; i >= 0; i--) {
      if (s[i] == '>')
        ans++;
      else
        break;
    }
    cout << ans << endl;
  }
  return 0;
}
