#include<bits/stdc++.h>
#define rep(i, n) for(int i=0; i<n; i++)
#define repo(i, n) for(int i=1; i<=n; i++)
#define ssort(a) sort(a.begin(), a.end())
#define INF 1001001001
#define INFll 100100100100100100
// debug用
#define PrintVec(x) for (auto elementPrintVec: x) { cout << elementPrintVec << " "; } cout << endl;

using namespace std;
using ull = unsigned long long;
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;

int main(){
  int x;
  cin >> x;
  if(x<0){
    x=0;
  }
  cout << x << endl;
  return 0;
}

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main(){
	int n;
	cin>>n;
	vector<int> a(2*n);
	rep(i, 2*n) cin>>a[i];

	vector<P> b;
	rep(i, 2*n) b.push_back(P(a[i], i));
	sort(b.begin(), b.end());
	P mid=b[n];

	vector<P> st;
	string ans;
	auto push=[&](P p){
		st.push_back(p);
		ans+='(';
	};
	auto pop=[&](){
		st.pop_back();
		ans+=')';
	};
	rep(i, 2*n){
		if(st.empty()) push(P(a[i], i));
		else{
			if(st.back()<mid==P(a[i], i)<mid) push(P(a[i], i));
			else pop();
		}
	}

	cout<<ans<<endl;
	return 0;
}
