#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  std::string path;
  std::cin >> path;
  int ans = 0;
  for (int i = 0; i < path.length(); i++) {
    if (path[i] == '<') ans++;
    if (path[i] == '>') break;
  }
  for (int i = path.length() - 1; i >= 0; i--) {
    if (path[i] == '>') ans++;
    if (path[i] == '<') break;
  }
  std::cout << ans << std::endl;
}
