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

int main() {
  int sum = 0;
  int day = 1;
  int n;
  cin >> n;
  for(int i = 1; i < n; i++) {
    sum += i;
    if(sum >=  n) {
      break;
    }
    day++;
  }  
  cout << day << endl;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<char> vc;
typedef queue<ll> ql;
typedef deque<ll> dql;
typedef priority_queue<ll> pql;
typedef set<ll> sl;
typedef pair<ll, ll> pl;
typedef map<ll, ll> ml;
typedef vector<vl> vvl;
typedef vector<pl> vpl;
#define rep(i, n) for(ll i = 0; i < ll(n); i++)
#define rep2(i, k, n) for(ll i = ll(k); i <= ll(n); i++)
#define rep3(i, n, k) for(ll i = ll(n); i >= ll(k); i--)
#define all(v) (v).begin(), (v).end()
ll mod(ll a, ll b) {return (a % b + b) % b;}
ll quo(ll a, ll b) {return (a - mod(a, b)) / b;}
template <typename T, typename U> bool chmin(T &a, const U b) {if(a > b) {a = b; return 1;} return 0;}
template <typename T, typename U> bool chmax(T &a, const U b) {if(a < b) {a = b; return 1;} return 0;}
const ll INF = 1LL << 60;
const ll MOD = 1e9 + 7;
//const ll MOD = 998244353;
const ll MAX = 2e5;
const ld eps = 1e-9;
const char newl = '\n';

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  ll n;
  string ans;
  cin >> n;
  vl a(2*n);
  rep(i, 2*n) cin >> a[i];
  vpl vec(2*n);
  rep(i, 2*n) vec[i] = pl(a[i], i);
  sort(all(vec));
  vb plus(2*n, 1);
  rep(i, n) plus[vec[i].second] = 0;
  ll cnt = 0;
  rep(i, 2*n) {
    if(plus[i]) {
      if(cnt >= 0) ans += '(';
      else ans += ')';
      cnt++;
    }else {
      if(cnt <= 0) ans += '(';
      else ans += ')';
      cnt--;
    }
  }
  cout << ans << newl;
  return 0;
}