#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  string s;
  cin >> n >> s;
  bool f = false;
  int ans = 0;
  for (int i = 0; i < n; i++)
    if (s[i] == '>')
      f = true;
    else if (!f)
      ans++;
  f = false;
  for (int i = n - 1; i >= 0; i--)
    if (s[i] == '<')
      f = true;
    else if (!f)
      ans++;
  cout << ans << endl;
  return 0;
}
