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