Example

Input

1


Output

)(
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define EACH(i, a) for(auto&& i:a)
#define FOR(i,a,b) for(ll i = (a); i < (b); ++i)
#define RFOR(i,a,b) for(ll i = (b)-1; i >= (a); --i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define pb push_back
#define ALL(v) (v).begin(),(v).end()

const ll linf = 1e18;
const ll inf = 1e9;

template<class T>
istream& operator>>(istream& is, vector<T>& vec) {
    EACH(x,vec) is >> x;
    return is;
}

ll f(ll m) {
    return m * (m+1) / 2;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll A; cin >> A;
    ll l = 1, r = 1e6;
    REP(t, 50) {
        ll m = (l + r) / 2;
        if ( f(m) >= A ) {
            r = m;
        }
        else {
            l = m;
        }
    }
    ll L = r*2;
    if (r == 1) {
        cout << ")(" << endl;
    }
    else {
        ll x = A - f(r-1);
        string ans = "";
        REP(i, x) ans += ")";
        ans += "(";
        FOR(i, x, r) {
            ans += ")";
        }
        REP(i, r-1) {
            ans += "(";
        }
        cout << ans << endl;
    }
}