#include <bits/stdc++.h>
using namespace std;
int n, sigma = 0, counter = 0, j, y[200005];
char a[200005];
stack<char> s1;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (a[i] == '<') {
      if (i == 0) {
        y[i] = 1;
        sigma++;
      } else if (y[i - 1] == 1) {
        sigma++;
        y[i] = 1;
      }
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] == '>') {
      if (i == n - 1) {
        y[i] = 1;
        sigma++;
      } else if (y[i + 1] == 1) {
        sigma++;
        y[i] = 1;
      }
    }
  }
  cout << sigma;
}
