#include <bits/stdc++.h>
using namespace std;
const int MN = 200 * 1000 + 200;
char a[MN];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == '<') {
      ans++;
    } else {
      break;
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] == '>') {
      ans++;
    } else {
      break;
    }
  }
  cout << ans;
}
