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