#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
  return (b != 0 ? gcd(b, a % b) : a);
}
template <typename T>
T lcm(T a, T b) {
  return (a / gcd(a, b) * b);
}
template <typename T>
T BigMod(T b, T p, T m) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    long long s = BigMod(b, p / 2, m) % m;
    return (s * s) % m;
  }
  long long sm = ((b % m) * (BigMod(b, p - 1, m) % m)) % m;
  return sm;
}
template <typename T>
T ModInv(T b, T m) {
  return BigMod(b, m - 2, m);
}
template <typename T>
T POW(T B, T P) {
  if (P == 0) return 1;
  if (P & 1)
    return B * POW(B, P - 1);
  else
    return (POW(B, P / 2) * POW(B, P / 2));
}
template <typename T>
T Swap(T &a, T &b) {
  T tmp = a;
  a = b;
  b = tmp;
}
int Set(int N, int pos) { return N = N | (1 << pos); }
int Reset(int N, int pos) { return N = N & ~(1 << pos); }
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
double DEG(double x) { return (180.0 * x) / (2.0 * acos(0.0)); }
double RAD(double x) { return (x * (double)2.0 * acos(0.0)) / (180.0); }
int toInt(string s) {
  int sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
template <class T>
inline bool readfast(T &x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
int R[] = {1, -1, 0, 0, 1, -1, -1, 1};
int C[] = {0, 0, 1, -1, 1, -1, 1, -1};
int KR[] = {-2, -2, -1, 1, 2, 2, -1, 1};
int KC[] = {1, -1, 2, 2, 1, -1, -2, -2};
struct P {
  double x, y;
  P(double x = 0.0, double y = 0.0) {
    this->x = x;
    this->y = y;
  }
};
P mkv(P ae, P be) { return P(be.x - ae.x, be.y - ae.y); }
double dtp(P ae, P be) { return (ae.x * be.x + ae.y * be.y); }
double crp(P ae, P be) { return (ae.x * be.y - ae.y * be.x); }
double val(P ae) { return sqrt(dtp(ae, ae)); }
P vresize(P ae, double llen) {
  double v = val(ae);
  return P(ae.x * llen / v, ae.y * llen / v);
}
double ART(P ae, P be) { return crp(ae, be) / 2.0; }
P rot(P ae, double ang) {
  return P(ae.x * cos(ang) - ae.y * sin(ang),
           ae.y * cos(ang) + ae.x * sin(ang));
}
char ss[200005];
int ar[200005];
int main() {
  int a, b, c, d, h, m, n, p, x, y, i, j, k, l, q, r, t, cnt, sm, tmp;
  scanf("%d %s", &n, &ss);
  memset(ar, 0, sizeof(ar));
  if (n == 1) {
    printf("1\n");
    return 0;
  }
  l = n;
  for (i = 0; i < l; i++) {
    if (ss[i] == '<')
      ar[i] = 1;
    else
      break;
  }
  for (i = l - 1; i >= 0; i--) {
    if (ss[i] == '>')
      ar[i] = 1;
    else
      break;
  }
  sm = 0;
  for (i = 0; i < n; i++) sm += ar[i];
  printf("%d\n", sm);
  return 0;
}
