#include <bits/stdc++.h>
using namespace std;
char s[200005];
bool b[200005];
int n, ans = 0;
void solve(int u) {
  if (u == 1) {
    if (u == n) {
      ans = 1;
      return;
    }
    if (s[u] == '<') {
      b[u] = true;
      ans++;
    }
    solve(u + 1);
    if (s[u] == '>')
      if (b[u + 1]) ans++;
    return;
  }
  if (u > n) return;
  if (u == n) {
    if (s[u] == '>' | b[u - 1]) {
      b[u] = true;
      ans++;
    }
    return;
  }
  if (s[u] == '<') {
    if (b[u - 1]) {
      b[u] = true;
      ans++;
    }
    solve(u + 1);
  } else {
    solve(u + 1);
    if (b[u + 1]) {
      b[u] = true;
      ans++;
    }
  }
}
int main() {
  scanf("%d", &n);
  scanf("%s", s + 1);
  solve(1);
  printf("%d\n", ans);
}
