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