#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)2e5 + 10;
const int mod = (int)1e9 + 7;
const int inf = (1 << 30) - 1;
const double pi = acos(-1);
const double eps = 1e-15;
int n, m;
string s;
void solve() {
  cin >> n >> 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";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
