#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.setf(ios::fixed);
  cout.precision(20);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '<') {
      ++ans;
    } else
      break;
  }
  for (int i = n - 1; i >= 0; --i) {
    if (s[i] == '>') {
      ++ans;
    } else
      break;
  }
  cout << ans << '\n';
}
