#include<iostream>
#include<algorithm>
using namespace std;

int main(){
	ios::sync_with_stdio(0);
	int tc,a,b,aa,bb;
	while(cin>>tc){
		aa=bb=0;
		for(int i=0;i<tc;i++){
			cin>>a>>b;
			(a>aa)&&(aa=a,bb=b);
		}
		cout<<aa+bb<<"\n";
	}
} 