// Original C++ solution (slower):
// Team Name : JU_MSB

// Members   : Shaheen,Biru,Mahbub



#include<bits/stdc++.h>



using namespace std;



#define ULL         unsigned long long

#define LL          long long int

#define D           double

#define X           first

#define Y           second

#define sz          size()

#define PB          push_back

#define MP          make_pair

#define CHR         getchar()

#define NL          printf("\n")

#define MEM(a,val)  memset(a,val,sizeof(a))

#define Max(a,b)    ((a>b)?a:b)

#define Min(a,b)    ((a<b)?a:b)

#define S1(a)       scanf("%d",&a)

#define S2(a,b)     scanf("%d%d",&a,&b)

#define S3(a,b,c)   scanf("%d%d%d",&a,&b,&c)

#define SL1(a)      scanf("%lld",&a)

#define SL2(a,b)    scanf("%lld%lld",&a,&b)

#define SL3(a,b,c)  scanf("%lld%lld%lld",&a,&b,&c)

#define all(a)      a.begin(),a.end()

#define F(i,a,b)    for(int i=a;i<b; i++)

#define R(i,a,b)    for(int i=a-1;i>=b; i--)

#define cp          cerr << "***** here here here here *****" << endl;



#define trace1(x)                cerr << #x << ": " << x << endl;

#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;

#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;

#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;



#define I2(a,b)     scanf("%d%d",&a,&b)

#define I3(a,b,c)   scanf("%d%d%d",&a,&b,&c)

#define L(a)        scanf("%lld",&a)

#define L2(a,b)     scanf("%lld%lld",&a,&b)

#define L3(a,b,c)   scanf("%lld%lld%lld",&a,&b,&c)

#define PL(a)       printf("%lld\n",a)

#define PT(t)       printf("Case %d: ",t)

#define SC          scanf

#define PC          printf

#define SZ(a)       ((int)a.size())-1

#define fr(i,a,b)   for(int i=a;i<=b; i++)

#define lol         printf("BUG\n")

#define mk          make_pair

// shaheen

#define I(X)                        scanf("%d",     &(X))

#define II(X, Y)                    scanf("%d%d",   &(X), &(Y))

#define III(X, Y, Z)                scanf("%d%d%d", &(X), &(Y), &(Z))

#define IL(X)                       scanf("%lld", &X)

#define IIL(X,Y )                   scanf("%lld%lld", &X,&Y)

#define IIIL(X,Y,Z)                 scanf("%lld%lld%lld", &X,&Y,&Z)

#define DI(X)         int X;        I(X);

#define DII(X, Y)     int X, Y;     II(X,Y)

#define DIII(X, Y, Z) int X, Y, Z;  III(X,Y,Z);

#define DIL(X)        LL X;         IL(X)

#define DIIL(X,Y)     LL X,Y;       IIL(X,Y)

#define DIIIL(X,Y,Z)  LL X,Y,Z;     IIIL(X,Y,Z)

#define PI(x)                       printf("%d\n",      x)

#define PII(x,y)                    printf("%d %d\n",   x,y)

#define PIII(x,y,z)                 printf("%d %d %d\n",x,y,z)

#define PIL(x)                      printf("%lld\n",          x)

#define PIIL(x,y)                   printf("%lld %lld\n",     x,y)

#define PIIIL(x,y,z)                printf("%lld %lld %lld\n",x,y,z)



#define rep(i,a,b)                  for(int i=a;i<=b;i++)

#define rev(i,a,b)                  for(int i=a;i>=b;i--)

#define repv(i,a)                   for(int i=0;i<(int)a.size();i++)

#define revv(i,a)                   for(int i=((int)a.size())-1;i>=0;i--)



#define pline                       cerr << "_________________________" << endl;



#define MD1 1000000007ULL

#define MD2 1000000009ULL

#define MD3 1000000021ULL

#define BS1 50ULL

#define BS2 50ULL

#define BS3 10000103ULL

#define PUL pair<ULL,ULL>

#define PLL pair<LL,LL>

#define pii pair<int,int>

///         0123456789

#define MX  300007

#define MOD 1000000007

#define INF 1000000000

#define EPS 1e-9

/// ==========================================////









int main()

{



    LL n;

    cin>>n;



    LL lo=1,hi=1e5;



    LL ans;



    while(lo<=hi) {

        LL mid=(lo+hi)/2;

        LL tp=(mid*(mid+1))/2;

        if(tp>=n) {

            ans=mid;

            hi=mid-1;

        }

        else lo=mid+1;

    }



    LL tp=(ans*(ans+1))/2;

    if(tp>n) ans--;

//    trace1(ans)



    LL nw=(ans*(ans+1))/2;



    if(  nw==n ) {

        F(i,0,ans) cout<< ")";

        F(i,0,ans) cout<< "(";

        NL;

    }

    else {

        LL bk=n-nw;

//        trace2(nw,bk)

        for(int i=0;i<ans;i++) {

            cout<< ")";

            if(i==bk-1) cout<<"()";

        }

        F(i,0,ans) cout<< "(";

        NL;

    }



    return 0;

}

// Optimized solution to the same problem (faster):
//??:2s   空?:512MB

//?意:要求求出最短的字典序最小的括号序列

//要求移?n次可以使他合法

//算法:通?枚???,...)))(((....,??是n*(n+1)/2的最?解

//所以?个之?就可以将最左?的(向左移?相?的位置

//可以??理出所有的n*(n+1)/2 

#include<cstdio>

#include<algorithm>

#define ll long long

using namespace std;

ll f[50005];

int chuli(int n){

	for(int i=1;i<=50000;i++){

		f[i]=i*(i+1)/2;

		if(f[i]>=n)return i;

	}	

}

void print(int x){

	for(int i=1;i<=x;i++)

		printf(")");

	for(int i=1;i<=x;i++)

		printf("(");

	printf("\n");

}

int main(){

//	freopen("a.in","r",stdin);

	int n;

	scanf("%d",&n);

	int ans=chuli(n);

	if(f[ans]==n)print(ans);

	else{

		int delt=f[ans]-n;

		for(int i=1;i<=ans-f[ans]+n;i++)

			printf(")");

		printf("(");

		for(int i=ans-f[ans]+n+2;i<=ans+1;i++)

			printf(")");

		for(int i=1;i<=ans-1;i++)

			printf("(");

		printf("\n");

	}

	return 0;

} 

// Fastest known solution for this problem: