#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, ans = 0;
  cin >> n;
  string s;
  cin >> s;
  for (long long i = 0; i < s.size(); ++i) {
    if (s[i] == '>') {
      ans = i + 1;
      break;
    }
  }
  if (!ans) {
    cout << n << '\n';
    return 0;
  }
  for (long long i = n - 1; i >= ans - 1; --i) {
    if (s[i] == '<') {
      ans = i - ans + 2;
      n -= ans;
      break;
    }
  }
  cout << n << '\n';
  return 0;
}
