#include <bits/stdc++.h>
using namespace std;
const long long mod7 = 1000000007;
long long A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W,
    X, Y, Z;
long long temp;
char tempChar;
string tempString;
vector<char> field;
int main() {
  cin >> N;
  long long sum = 0;
  for (long long i = 0; i < N; i++) {
    cin >> tempChar;
    field.push_back(tempChar);
  }
  for (long long i = 0; i < N; i++) {
    if (field[i] == '<')
      sum++;
    else
      break;
  }
  for (long long i = N - 1; i >= 0; i--) {
    if (field[i] == '>')
      sum++;
    else
      break;
  }
  cout << sum;
}
