Example

Input

1


Output

)(
#include<bits/stdc++.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) for(int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x)  cerr << #x << " = " << (x) << endl;
//const int INF = 1e8;
using namespace std;

int main(){
	int n;
	cin >> n;

	int tmp = 0, k = 0;
	while(n > tmp){
		k++;
		tmp += k;
	}
	n = tmp - n;

	int countDown = k;
	int close = k;
	string ans;
	rep(i,k){
		if(countDown <= n){
			n -= countDown;
			close--;
			ans += '(';
		}
		countDown--;
		ans += ')';
	}
	rep(i,close){
		ans += '(';
	}
	cout << ans << endl;
}

