Example

Input

1


Output

)(
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;

int A;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);

  cin >> A;
  int n = 1;
  while (true) {
    if ((ll)n * (n + 1) / 2 >= A) break;
    n++;
  }
  int pos = n - ((ll)n * (n + 1) / 2 - A);
  for (int i = 0; i < pos; i++) {
    cout << ")";
  }
  cout << "(";
  for (int i = 0; i < n - pos; i++) {
    cout << ")";
  }
  for (int i = 0; i < n - 1; i++) {
    cout << "(";
  }
  cout << endl;

  return 0;
}
