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