#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf(" %d", &n);
  string s;
  cin >> s;
  int hasop = 0;
  int out = 0, in = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '>')
      hasop = 1;
    else if (s[i] == '<' && hasop)
      in++;
    else
      out++;
  }
  hasop = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '<')
      hasop = 1;
    else if (s[i] == '>' && hasop)
      in++;
    else
      out++;
  }
  cout << out << endl;
  return 0;
}
