#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 5;
int l[MAX];
int N, ans = 0;
int main() {
  cin >> N;
  string s;
  cin >> s;
  s = ' ' + s;
  l[0] = 1;
  for (int i = 1; i < s.size(); ++i) {
    if (l[i - 1] && s[i] == '<') l[i] = 1;
  }
  l[s.size()] = 1;
  for (int i = s.size() - 1; i > 0; --i) {
    if (l[i + 1] && s[i] == '>') l[i] = 1;
  }
  for (int i = 1; i < s.size(); ++i) ans = ans + l[i];
  cout << ans << endl;
}
