#include <bits/stdc++.h>
using namespace std;
int n, k, y, sayac;
string a;
int main() {
  scanf("%d", &n);
  cin >> a;
  for (int i = 0; i <= n - 1; i++) {
    if (a[i] == '>' && a[i + 1] == '<' && i <= n - 2) {
      k = i - 1;
      break;
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] == '<' && a[i - 1] == '>' && i >= 1) {
      y = i + 1;
      break;
    }
  }
  for (int i = 0; i <= k; i++) {
    if (a[i] == '<') {
      sayac++;
    }
  }
  for (int i = y; i <= n - 1; i++) {
    if (a[i] == '>') {
      sayac++;
    }
  }
  if (k == 0 && y == 0) {
    cout << n;
    return 0;
  }
  cout << sayac;
  return 0;
}
