// Original C++ solution (slower):
//#include <bits/stdc++.h>

#include<cstdio>

#include<cstring>

#include<cmath>

#include<algorithm>

#include<map>

#include<queue>

#include<stack>

#include<vector>

#include<deque>

#include<functional>

#include<string>

#include<iostream>

#include<cctype>

#include<set>

#include<climits>

#include<iomanip>

#include<cassert>

#include<sstream>



#define pb push_back

#define nl puts ("")

#define sp printf ( " " )

#define phl printf ( "hello\n" )

#define ff first

#define ss second

#define POPCOUNT __builtin_popcountll

#define RIGHTMOST __builtin_ctzll

#define LEFTMOST(x) (63-__builtin_clzll((x)))

#define MP make_pair

#define FOR(i,x,y) for(vlong i = (x) ; i <= (y) ; ++i)

#define ROF(i,x,y) for(vlong i = (y) ; i >= (x) ; --i)

#define CLR(x,y) memset(x,y,sizeof(x))

#define UNIQUE(V) (V).erase(unique((V).begin(),(V).end()),(V).end())

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

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

#define NUMDIGIT(x,y) (((vlong)(log10((x))/log10((y))))+1)

#define SQ(x) ((x)*(x))

#define ABS(x) ((x)<0?-(x):(x))

#define FABS(x) ((x)+eps<0?-(x):(x))

#define ALL(x) (x).begin(),(x).end()

#define LCM(x,y) (((x)/gcd((x),(y)))*(y))

#define SZ(x) ((vlong)(x).size())

#define NORM(x) if(x>=mod) x-=mod;if(x<0) x+=mod;

#define MOD(x,y) (((x)*(y))%mod)

#define ODD(x) (((x)&1)==0?(0):(1))

#define Set(N,cur) N=(N|(1LL<<cur))

#define Reset(N,cur) N=(N&(~(1LL<<cur)))

#define Check(N,cur) (!((N&(1LL<<cur))==0))

#define fast_cin ios_base::sync_with_stdio(false);cin.tie(NULL)



using namespace std;





#define LL long long

#define LLU long long unsigned int

typedef long long vlong;

typedef unsigned long long uvlong;

typedef pair < int, int > pii;

typedef pair < vlong, vlong > pll;

typedef vector<int> vi;

typedef vector<vlong> vl;

typedef vector<pll> vll;



#ifdef forthright48

     #include <ctime>

     clock_t tStart = clock();

     #define debug(args...) {dbg,args; cerr<<endl;}

     #define timeStamp debug ("Execution Time: ", (double)(clock() - tStart)/CLOCKS_PER_SEC)

     #define bug printf("%d\n",__LINE__);



#else

    #define debug(args...)  // Just strip off all debug tokens

    #define timeStamp

#endif



struct debugger{

    template<typename T> debugger& operator , (const T& v){

        cerr<<v<<" ";

        return *this;

    }

}dbg;



inline vlong gcd ( vlong a, vlong b ) {

    a = ABS ( a ); b = ABS ( b );

    while ( b ) { a = a % b; swap ( a, b ); } return a;

}



vlong ext_gcd ( vlong A, vlong B, vlong *X, vlong *Y ){

    vlong x2, y2, x1, y1, x, y, r2, r1, q, r;

    x2 = 1; y2 = 0;

    x1 = 0; y1 = 1;

    for (r2 = A, r1 = B; r1 != 0; r2 = r1, r1 = r, x2 = x1, y2 = y1, x1 = x, y1 = y ) {

        q = r2 / r1;

        r = r2 % r1;

        x = x2 - (q * x1);

        y = y2 - (q * y1);

    }

    *X = x2; *Y = y2;

    return r2;

}



inline vlong modInv ( vlong a, vlong m ) {

    vlong x, y;

    ext_gcd( a, m, &x, &y );

    x %= m;

    if ( x < 0 ) x += m;

    return x;

}



inline vlong power ( vlong a, vlong p ) {

    vlong res = 1, x = a;

    while ( p ) {

        if ( p & 1 ) res = ( res * x );

        x = ( x * x ); p >>= 1;

    }

    return res;

}



inline vlong bigmod ( vlong a, vlong p, vlong m ) {

    vlong res = 1 % m, x = a % m;

    while ( p ) {

        if ( p & 1 ) res = ( res * x ) % m;

        x = ( x * x ) % m; p >>= 1;

    }

    return res;

}





//int knightDir[8][2] = { {-2,1},{-1,2},{1,2},{2,1},{2,-1},{-1,-2},{1,-2},{-2,-1} };

//int dir4[4][2] = {{-1,0},{0,1},{1,0},{0,-1}};

//int dir8[8][2] = {{-1,0},{0,1},{1,0},{0,-1},{-1,-1},{1,1},{1,-1},{-1,1}};

const vlong inf = 2147383647;

const vlong mod = 1000000007;

const double pi = 2 * acos ( 0.0 );

const double eps = 1e-9;



///======================  TEMPLATE ENDS HERE  =====================///





/** WARNING WARNING WARNING **/

//  1. Simulate Sample Test Case Before Coding

//  2. Read Input & Output Format Before Coding

//  3. Check Corner Case Specially When N<3

//  4. Check Array Size, Mod Value & Long Long

//  5. Check DP1 Memoization Part & Call Parameters

//  6. Check Problem No When Submitting







int main () {

    #ifdef forthright48

    //freopen ( "Ainput.txt", "r", stdin );

    //freopen ( "output.txt", "w", stdout );

    #endif // forthright48



    //while(1){

        vlong n;

        scanf ( "%lld", &n );



        string s = "";



        vlong now = 1;

        while (n > 0) {



            //debug(n, s);



            if (now >= n) {

                vlong cur = now;

                while (cur > n) {

                    s = ')' + s;

                    cur--;

                }

                s = '(' + s;

                while (cur > 0) {

                    s = ')' + s;

                    cur--;

                }

                n = 0;

            }



            else {

                s = '(' + s;

                n -= now;

            }



            now++;



        }



        printf("%s\n", s.c_str());





    //}





    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: