#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string in;
  cin >> in;
  vector<int> dir(n);
  for (int i = 0; i < n; i++) {
    if (in[i] == '>')
      dir[i] = 1;
    else
      dir[i] = 0;
  }
  int num = 0;
  for (int i = 0; i < n; i++) {
    if (dir[i] == 0)
      num++;
    else
      break;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (dir[i] == 1)
      num++;
    else
      break;
  }
  cout << num << endl;
  return 0;
}
