#include <bits/stdc++.h>
using namespace std;
int save[200005];
int main() {
  char s[200005];
  int tam, rsp, i, j, k;
  vector<int> pos;
  memset(save, 0, sizeof save);
  scanf("%d\n", &tam);
  gets(s);
  rsp = 0;
  for (i = 0; i < tam; i++) {
    if (save[i]) continue;
    k = i;
    pos.clear();
    while (1) {
      if (k < 0 || k >= tam || save[k] == 1) {
        for (j = 0; j < pos.size(); j++) {
          rsp++;
          save[pos[j]] = 1;
        }
        break;
      }
      pos.push_back(k);
      if (save[k] == 2) break;
      save[k] = 2;
      if (s[k] == '>')
        k++;
      else
        k--;
    }
  }
  printf("%d\n", rsp);
}
