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