#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  int ans = 0;
  int i = 0, j = n - 1;
  while (i < n && str[i] == '<') {
    ++ans;
    i++;
  }
  while (i <= j && str[j] == '>') {
    ++ans;
    j--;
  }
  cout << ans;
  return 0;
}
