#include <bits/stdc++.h>
using namespace std;
int n, cnt = 0;
char s[200010];
int main() {
  scanf("%d%s", &n, s);
  for (auto i = s; i; i++) {
    if (*i == '<')
      cnt++;
    else
      break;
  }
  for (auto i = s + n - 1; i; i--) {
    if (*i == '>')
      cnt++;
    else
      break;
  }
  cout << cnt << endl;
  return 0;
}
