#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string queue;
  cin >> queue;
  int max = 0;
  int i = 0;
  int x, y;
  while (i < n) {
    if (queue[i] == '>' && queue[i + 1] == '<') {
      x = i;
      y = i + 1;
      while (x >= 0) {
        if (queue[x] == '>') {
          max++;
          x--;
        } else
          break;
      }
      while (y < n) {
        if (queue[y] == '<') {
          max++;
          y++;
        } else
          break;
      }
      i = y;
    } else
      i++;
  }
  cout << n - max;
}
