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