program main
	implicit none
	integer n
	integer ::i,nin=0,bnin
	integer,allocatable,dimension(:)::a,b
	read(*,*)n
	allocate(a(n))
	allocate(b(n))	
	do i=1,n
		read(*,*)a(i),b(i)
	enddo
	do i=1,n
		if(nin<a(i))then
			nin=a(i)
			bnin=b(i)
		endif
	enddo
	nin=nin+bnin
	write(*,*)nin
end program main
