Example

Input

1


Output

)(
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcount

#define INF INT_MAX/3

ll n;
string res;

int main(){
	cin.sync_with_stdio(false);
  cin>>n;
  ll sum=0;
  repl(i,1,n+1){
    ll nxt=i+1;
    if(nxt*(nxt+1)/2>n){
      n-=i*(i+1)/2;
      string tmp;
      rep(j,i)tmp='('+tmp;
      rep(j,i)tmp=')'+tmp;
      if(n>0){
        res=")"+tmp.substr(0,n-1)+"("+tmp.substr(n-1,tmp.size()-n+1);
      }else res=tmp;
      break;
    }
  }
  cout<<res<<endl;
  return 0;
}