#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long int LINF = 0x3f3f3f3f3f3f3f3fll;
const long double pi = acos(-1);
const int MOD = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  ;
  int n;
  cin >> n;
  int a = 0, b = 0;
  string s;
  cin >> s;
  int r = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '<')
      r++;
    else
      break;
  }
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '>')
      r++;
    else
      break;
  }
  cout << r << endl;
  return 0;
}
