Example

Input

1


Output

)(
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define REP(i,i_len) for (ll i = 0, i##_len = (i_len); i < i##_len; i++)
#define ALL_OF(v) (v).begin(), (v).end()

int main() {

    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    ll a; cin >> a;
    string s; s.reserve(10000);
    for (ll b = 0, rl = 0, h = 0; b < a; ) {
        ll b2 = b + h + 1;
        if (b2 <= a) {
            b = b2;
            s.push_back(')');
            h++;
            if (b2 == a) {
                REP(i, h) {
                    s.push_back('(');
                }
                break;
            }
        } else {
            s.push_back('(');
            h--;
        }
    }
    reverse(ALL_OF(s));
    REP(i, s.size()) s[i] ^= ')' ^ '(';

    cout << s << endl;

}
