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