#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
const int mod = 1e9 + 7;
using namespace std;
template <class T>
void cinn(T& x) {
  cin >> x;
}
template <class H, class... T>
void cinn(H& h, T&... t) {
  cinn(h);
  cinn(t...);
}
template <class A>
void cinn(vector<A>& x) {
  for (auto& a : x) cinn(a);
}
void Shazam() {
  long long n;
  cinn(n);
  string s;
  cinn(s);
  long long cnt1 = 0, cnt2 = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '<')
      cnt1++;
    else
      break;
  }
  for (long long i = n - 1; i >= 0; i--) {
    if (s[i] == '>')
      cnt2++;
    else
      break;
  }
  cout << cnt1 + cnt2 << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t = 1;
  while (t--) Shazam();
  return 0;
}
