Example

Input

1


Output

)(
#include <bits/stdc++.h>

#define ALL(a) (a).begin(), (a).end()
#define llong long long

using namespace std;

signed main(){
	size_t n; cin >> n;
	vector<size_t> tri;
	tri.push_back(0);
	for(size_t i = 1;i*(i-1)/2 <= 1000000000; i++){
		tri.push_back((i*(i+1))/2);
	}
	//cerr << tri.back() << endl;
	//cerr << tri[tri.size()-2] << endl;

	auto lb = lower_bound(ALL(tri), n);
	size_t idx = distance(tri.begin(), lb);

	string ans = "";
	for(size_t i = 0; i < idx; i++) ans += ")";
	for(size_t i = 0; i < idx; i++) ans += "(";
	assert(*lb - n < idx);
	size_t diff = *lb - n;
	size_t j = idx-1;
	for(size_t i = 0; i < diff; i++, j--){
		swap(ans[j], ans[j+1]);
	}
	cout << ans << endl;

	return 0;
}


