#include <bits/stdc++.h>
using namespace std;
const int maxn = 200050;
int len;
char a[maxn];
int main() {
  while (scanf("%d", &len) != EOF) {
    scanf("%s", a);
    int ans = 0;
    for (int i = 0; i < len; i++)
      if (a[i] == '<')
        ans++;
      else
        break;
    for (int i = len - 1; i >= 0; i--)
      if (a[i] == '>')
        ans++;
      else
        break;
    printf("%d\n", ans);
  }
  return 0;
}
