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