#import <Foundation/Foundation.h>
typedef long long Int;
int main() {
	int n;
	Int A,B = LLONG_MAX;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		Int a,b;
		scanf("%lld %lld",&a,&b);
		if(b<B){
			B=b;
			A=a;
		}
	}
	printf("%lld\n",A+B);
}