#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  long long l = 0, r = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '<')
      l++;
    else
      break;
  }
  for (long long i = n - 1; i >= 0; i--) {
    if (s[i] == '>')
      r++;
    else
      break;
  }
  cout << l + r << endl;
  return 0;
}
