#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, ans = 0, i, r = 0, l = 0;
  string arr;
  cin >> n;
  cin >> arr;
  for (i = 0; i < arr.size(); i++) {
    if (arr[i] == '<')
      ans++;
    else
      break;
  }
  for (i = arr.size() - 1; i >= 0; i--) {
    if (arr[i] == '>')
      ans++;
    else
      break;
  }
  cout << ans << endl;
}
