#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e15;
const long long mod = 1e9 + 7;
void faster() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
const long long M = 100 + 10;
const long long N = 100 * 1000 + 10;
long long dp[N][2], a[N];
int main() {
  faster();
  int n;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '<')
      a[i] = 0;
    else
      a[i] = 1;
  }
  long long ans = 0;
  int l = 0;
  while (a[l] == 0 && l < n) {
    ans++;
    l++;
  }
  int r = n - 1;
  while (a[r] == 1 && r >= 0) {
    ans++;
    r--;
  }
  cout << ans << endl;
}
