#include <bits/stdc++.h>
const long inf = 1e9;
int main() {
  int N;
  ;
  scanf("%d", &N);
  std::vector<char> symb(N);
  std::string str;
  std::cin >> str;
  for (int i = 0; i < N; i++) {
    symb[i] = str[i];
  }
  int numPos = 0;
  for (int p = 0; p < N && symb[p] == '<'; p++) {
    numPos++;
    std::cerr << p << " is <\n";
  }
  for (int p = N - 1; p >= 0 && symb[p] == '>'; p--) {
    numPos++;
    std::cerr << p << " is >\n";
  }
  std::printf("%d\n", numPos);
  return 0;
}
