#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e5 + 1e4 + 100;
const int INF = 0x3f3f3f3f;
int a[maxn], n;
char s[maxn];
int main() {
  cin >> n;
  scanf("%s", s + 1);
  s[0] = '<';
  s[n + 1] = '>';
  memset(a, 0, sizeof a);
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '<')
      a[i] = 1;
    else
      break;
  }
  for (int i = n; i > 0; --i) {
    if (s[i] == '>')
      a[i] = 1;
    else
      break;
  }
  int ans = 0;
  for (int i = 1; i <= n; ++i) {
    ans += a[i];
  }
  cout << ans << "\n";
  return 0;
}
