#include <bits/stdc++.h>
using namespace std;
long long inf = 1e18 + 42;
const int M = 1e9 + 7;
const int MN = 1e9;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '<')
      cnt++;
    else
      break;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '>')
      cnt++;
    else
      break;
  }
  cout << cnt << endl;
  return 0;
}
