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

int main() {
	int n,a,b,ta=0,tb;cin>>n;
  	for(int i=0;i<n;i++){
    	cin>>a>>b;
      	if(ta<a){
        	ta=a;tb=b;
        }
    }
  	cout<<ta+tb<<endl;
 }