#include<bits/stdc++.h>
using namespace std;
int main() {
	int N;
	cin >> N;
	vector<int>a(N);
  	vector<int>b(N);
	for (int i = 0; i < N; i++) {
		cin >> a[i] >> b[i];
	}
	sort(a.begin(),a.end());
  	sort(b.begin(),b.end());
	cout << a[N-1] + b[0] << endl;
}

