Example

Input

1


Output

)(
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
  long long int n;
  cin >> n;
  string ans;
  
  long long int ok = 0, ng = 10000000000, m;
  while(ng - ok > 1){
    m = (ok + ng)/2;
    if(m*(m+1)/2 <= n) ok = m;
    else ng = m;
  }
  n -= ok*(ok+1)/2;
  //cout << ok << endl;
  if(n){
    ans = (string(ok+2,')') + string(ok,'('));
    ans[n] = '(';
  }else{
    ans = (string(ok,')') + string(ok,'('));
  }
  cout << ans << endl;
  return 0;
}

