Example

Input

1


Output

)(
#include <bits/stdc++.h>
using namespace std;

int main()
{
	ios::sync_with_stdio(false), cin.tie(0);
	int A;
	cin >> A;
	int lb = 0, ub = 1e5;
	while (ub - lb > 1) {
		int m = (lb + ub) >> 1;
		if ((long long)m * (m + 1) / 2 >= A) {
			ub = m;
		}
		else {
			lb = m;
		}
	}
	int n = ub;
	vector<int> sp(n);
	for (int i = 0; i < n; i++) {
		if (A >= i + 1) {
			A -= i + 1;
		}
		else {
			sp[i] = i + 1 - A;
			A = 0;
		}
	}
	string res(n * 2, ')');
	int it = 0;
	for (int i = 0; i < n; i++) {
		it += sp[i];
		res[it++] = '(';
	}
	reverse(res.begin(), res.end());
	cout << res << endl;
	return 0;
}

