Example

Input

1


Output

)(
#include <bits/stdc++.h>
#define int long long
#define REP(i,n) for(int i=0; i<(int)(n); ++i)
#define DEBUG(x) cerr << #x << " " << x << endl
using namespace std;
 
int magic(int A) {
  for(int k = 0; ; ++k) {
    if(A <= k * (k + 1) / 2) return k;
  }
  return -1;
}
 
string paren(int a, int n) {
  // DEBUG(a);
  // DEBUG(n);
  if(a == n * (n + 1) / 2) {
    string ret;
    REP(i,n) ret += ")";
    REP(i,n) ret += "(";
    return ret;
  }
  else {
    int rem = a - n;
    int k = magic(rem);
    string ret = ")";
    for(int i = 0; i < n - 1 - k; ++i) ret += "()";
    ret += paren(rem, k);
    ret += "(";
    return ret;
  }
}
 
signed main() {
  int A; cin >> A;
  int k = magic(A);
  cout << paren(A, k) << endl;
}