Example

Input

1


Output

)(
#include <bits/stdc++.h>
using namespace std;
int main(){
  int A;
  cin >> A;
  int tv = -1;
  int fv = 100000;
  while (fv - tv > 1){
    int mid = (tv + fv) / 2;
    if ((long long) mid * (mid + 1) / 2 < A){
      tv = mid;
    } else {
      fv = mid;
    }
  }
  string ans = ")(";
  for (int i = 0; i < tv; i++){
    ans += ")";
  }
  for (int i = 0; i < tv; i++){
    ans += "(";
  }
  int r = A - tv * (tv + 1) / 2 - 1;
  for (int i = 1; i <= r; i++){
    swap(ans[i], ans[i + 1]);
  }
  cout << ans << endl;
}
