#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int r = 0;
  int x = 0;
  while (x < s.size() and s[x++] == '<') r++;
  x = s.size() - 1;
  while (x >= 0 and s[x--] == '>') r++;
  cout << r << endl;
  return 0;
}
