#include <bits/stdc++.h>
using namespace std;
long long bigmod(long long p, long long e, long long M) {
  long long ret = 1;
  while (e > 0) {
    if (e % 2) ret = (ret * p) % M;
    p = (p * p) % M;
    e /= 2;
  }
  return ret;
}
long long power(long long x, long long y) {
  long long ans = 1;
  while (y > 0) {
    if (y % 2) ans *= x;
    x *= x;
    y /= 2;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  a = abs(a);
  b = abs(b);
  while (b != 0) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
string s;
int f[200005], b[200005];
int n;
int main() {
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '>') {
      f[i]++;
    } else {
      b[i]++;
    }
  }
  for (int i = 1; i < n; i++) {
    f[i] += f[i - 1];
    b[i] += b[i - 1];
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '<' && i == 0) {
      ans++;
    } else if (s[i] == '>' && i == n - 1) {
      ans++;
    } else if (s[i] == '>' && f[n - 1] - f[i] == n - 1 - i) {
      ans++;
    } else if (s[i] == '<' && b[i - 1] == i) {
      ans++;
    }
  }
  cout << ans;
}
