#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void umax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
inline void umin(T &a, T b) {
  if (a > b) a = b;
}
template <class T>
inline T abs(T a) {
  return a > 0 ? a : -a;
}
const int inf = 1e9 + 143;
const long long longinf = 1e18 + 143;
inline int read() {
  int x;
  scanf(" %d", &x);
  return x;
}
int main() {
  int n = read();
  string s;
  cin >> s;
  int l = 0;
  while (l < n && s[l] == '<') l++;
  int r = n - 1;
  while (r >= 0 && s[r] == '>') r--;
  int cr = n - 1 - r;
  printf("%d\n", min(n, l + cr));
  return 0;
}
