#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  int a;
  string s;
  cin >> a >> s;
  int sum = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '<')
      sum++;
    else
      break;
  }
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '>')
      sum++;
    else
      break;
  }
  cout << sum << endl;
  return 0;
}
