#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int main() {
  ios::sync_with_stdio(false);
  int n, a = -1, b = -1;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; i++)
    if (s[i] == '>') {
      a = i;
      break;
    }
  for (int i = n - 1; i >= 0; i--)
    if (s[i] == '<') {
      b = i;
      break;
    }
  if (a == -1 || b == -1)
    cout << n;
  else
    cout << a + n - b - 1;
}
