Example

Input

1


Output

)(
#include <algorithm>
#include <iostream>
#include <cstring>
#include <climits>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>

#define fi first
#define lc (x<<1)
#define se second
#define U unsigned
#define rc (x<<1|1)
#define Re register
#define LL long long
#define MP std::make_pair
#define CLR(i,a) memset(i,a,sizeof(i))
#define FOR(i,a,b) for(Re int i = a;i <= b;++i)
#define ROF(i,a,b) for(Re int i = a;i >= b;--i)
#define SFOR(i,a,b,c) for(Re int i = a;i <= b;i+=c)
#define SROF(i,a,b,c) for(Re int i = a;i >= b;i-=c)
#define DEBUG(x) std::cerr << #x << '=' << x << std::endl

#define int LL
int n;
inline int get(int k){ // k(k+1) <= 2*n
    int L = 1,R = n,ans;
    while(L <= R){
        int mid = (L + R) >> 1;
        if(mid*(mid+1) <= 2*n) ans = mid,L = mid+1;
        else R = mid-1;
    }
    return ans;
}

std::vector<int> x;

signed main(){
    //freopen("q.out","w",stdout);
    scanf("%lld",&n);
    int k = get(n);
    if(k*(k+1)==2*n){
        FOR(i,1,k) putchar(')');
        FOR(i,1,k) putchar('(');
        putchar('\n');
        return 0;
    }
    //DEBUG(k);DEBUG((k+1)*(k+2)/2);
    int d = ((k+1)*(k+2))/2 - n;
    k++;
    FOR(i,1,k){
        if(i == k-d+1) putchar('(');
        else putchar(')');
    }
    putchar(')');
    FOR(i,2,k) putchar('(');
    putchar('\n');
    return 0;
}
