#include <bits/stdc++.h>
using namespace std;
void file() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
int n, a[100001], suf[200002], pref[200001], ans;
string s;
bool f;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  cin >> s;
  for (int i = 1; i <= n; ++i) {
    pref[i] = pref[i - 1];
    if (s[i - 1] == '<') pref[i]++;
    if (pref[i] == i) ans++;
  }
  for (int i = n; i >= 1; i--) {
    suf[i] = suf[i + 1];
    if (s[i - 1] == '>') suf[i]++;
    if (suf[i] == (n - i + 1)) ans++;
  }
  cout << ans;
}
