Example

Input

1


Output

)(
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <ctime>
#include <map>
#include <assert.h>
#include <stack>
#include <set>
#include <bitset>
#include <queue>
#include <iomanip>
#include <cstring>
#include <algorithm>
using namespace std;

#define sacnf scanf
#define scnaf scanf
#define scnafi scanfi
#define pb push_back
#define Len size()
#define gchar getchar()
#define FOR(i,j,k) for(int (i)=(j);(i)<=(k);++(i))
#define mes(a,b) memset((a),(b),sizeof(a))
#define scanfi(a) scanf("%d",&(a))
#define scanfti(a,b) scanf("%d%d",&(a),&(b))
#define println(a) printf("%d\n",(a))
#define printIs(a) printf((a)?"Yes\n":"No\n")
#define print_b printf("\n")
#define IsNum(x) '0'<=(x)&&(x)<='9'
#define lt dir*2
#define rt dir*2+1

#define maxn 50010
#define maxm 26
#define inf 1061109567
//const long long inf=1e15;
#define INF 0x3f3f3f3f
#define eps 1e-9
#define E 2.718281828459
const double PI=acos(-1.0);
#define mod 1000
//const long long mod=1000000007;
#define MAXNUM 1000000000

typedef long long ll;
typedef unsigned long long ulld;
ll Abs(ll x) {return (x<0)?-x:x;}
int Read() {char ch;int res=0;while(ch=getchar(),!(IsNum(ch)));while(IsNum(ch)) res=res*10+ch-'0',ch=getchar();return res;}

int tmp[maxn];

int main()
{
    //freopen("data.in","r",stdin);
    //freopen("std.out","w",stdout);
    FOR(i,2,50000) tmp[i-1]=i&1?(i-1)/2*i:i/2*(i-1);
    int n;
    while(~scanfi(n))
    {
        int i;
        for(i=49999;i>0;i--)
        {
            if(n>=tmp[i]) break;
        }
        if(n==tmp[i])
        {
            FOR(j,1,i) printf(")");
            FOR(j,1,i) printf("(");
        }
        else
        {
            FOR(j,1,n-tmp[i]) printf(")");
            printf("()");FOR(j,1,i-n+tmp[i]) printf(")");
            FOR(j,1,i) printf("(");
        }
        print_b;
    }
    //clock_t ed=clock();
    //printf("\n\nTime Used : %.5lf Ms.\n",(double)(ed-st)/CLOCKS_PER_SEC);
    return 0;
}