#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n;
  string s;
  cin >> n;
  cin >> s;
  if (s[0] == '>' and s[n - 1] == '<') {
    cout << 0 << "\n";
  } else {
    int count1 = 0, count2 = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] == '<') {
        count1++;
      } else {
        break;
      }
    }
    for (int i = n - 1; i >= 0; i--) {
      if (s[i] == '>') {
        count2++;
      } else {
        break;
      }
    }
    cout << count1 + count2 << "\n";
  }
  return 0;
}
