#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  string s;
  int n;
  cin >> n;
  cin >> s;
  vector<pair<char, int>> compress;
  int lastPos = 0;
  compress.push_back(make_pair(s[0], 0));
  for (int i = 1; i < n; i++) {
    if (s[i] == compress.back().first) {
      compress.back().second++;
    } else {
      compress.push_back(make_pair(s[i], i));
      lastPos++;
    }
  }
  int sum = 0;
  if (compress[0].first == '<') {
    sum += compress[0].second + 1;
  }
  if (compress.back().first == '>') {
    if (lastPos - 1 >= 0) {
      sum += (n - 1 - compress[lastPos - 1].second);
    } else {
      sum += n;
    }
  }
  cout << sum << endl;
  return 0;
}
