#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200007;
int state[MAXN];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  cin >> n;
  vector<char> a(n + 1);
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int ans = 0, k = 0;
  for (int i = 1; i <= n; ++i) {
    if (a[i] == '<') {
      if (state[i - 1] == 0) {
        state[i] = 0;
        ++ans;
      } else {
        state[i] = 1;
      }
      k = 0;
    } else {
      state[i] = 1;
      ++k;
    }
  }
  cout << ans + k;
  return 0;
}
