Example

Input

7
>>


Output

7
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = uint32_t;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int n;
    string s;
    cin >> n >> s;
    int cnt1 = 0, cnt2 = 0;
    for (int i = 0; i < n; ++i) {
        if(s[i] == '<') cnt1++;
        else break;
    }
    for (int i = 0; i < n; ++i) {
        if(s[n-i-1] == '>') cnt2++;
        else break;
    }
    cout << n-min(cnt1, cnt2) << "\n";
    return 0;
}
