#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const int N = 3e5 + 10;
int main() {
  string str;
  int n;
  cin >> n;
  cin >> str;
  int ans = 0;
  for (auto &c : str) {
    if (c == '<')
      ans++;
    else
      break;
  }
  reverse(str.begin(), str.end());
  for (auto &c : str) {
    if (c == '>')
      ans++;
    else
      break;
  }
  cout << ans << endl;
  return 0;
}
