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