Example

Input

1


Output

)(
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <cmath>
#include <cassert>
#include <numeric>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>

using namespace std;
using ll = long long;

ll root(const ll n)
{
    if (n == 1) {
        return 1;
    } else if (n == 0) {
        return 0;
    }
    ll inf = 0;
    ll sup = n;
    while (inf < sup - 1) {
        const ll mid = (inf + sup) / 2;
        const ll sq = mid * mid;
        if (sq < n) {
            inf = mid;
        } else if (sq > n) {
            sup = mid;
        } else {
            return mid;
        }
    }
    return inf;
}

int main()
{
    ll A;
    cin >> A;
    ll inf = 0;
    ll sup = 100000;
    while (inf < sup - 1) {
        const ll mid = (inf + sup) / 2;
        const ll calc = mid * (mid + 1) / 2;
        if (calc < A) {
            inf = mid;
        } else if (calc > A) {
            sup = mid;
        } else {
            sup = mid;
            inf = mid;
        }
    }
    const ll l = sup;
    ll area = 2 * A - l;
    auto sq = [=](const ll x, const ll y) {
        return (l - x) * (l - x) - 2 * (l - y);
    };
    auto up_add = [=](const ll x, const ll y) {
        return 0;
        //        return 2 * x;
    };
    auto right_add = [=](const ll x, const ll y) {
        return 2 * y - 2 * x - 1;
    };

    ll x = 0;
    ll y = 1;
    string s = ")";
    for (int i = 0; i < 2 * l - 1; i++) {
        if (area <= sq(x, y)) {
            s.push_back('(');
            area -= right_add(x, y);
            x++;
        } else {
            s.push_back(')');
            area -= up_add(x, y);
            y++;
        }
    }
    cout << s << endl;

    return 0;
}