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