import sys



input = sys.stdin.readline





def main():

    N = int(eval(input()))

    A = [None] * N

    B = [None] * N

    for i in range(N):

        A[i], B[i] = list(map(int, input().split()))



    x = max(A)

    y = B[A.index(x)]

    ans = x + y



    print(ans)





if __name__ == "__main__":

    main()

import sys



input = sys.stdin.readline





def main():

    N = int(eval(input()))

    x = y = 0

    for _ in range(N):

        A, B = list(map(int, input().split()))

        if A > x:

            x = A

            y = B



    ans = x + y

    print(ans)





if __name__ == "__main__":

    main()

import sys

input = sys.stdin.readline


def main():
    N = int(eval(input()))
    A = [None] * N
    B = [None] * N
    for i in range(N):
        A[i], B[i] = list(map(int, input().split()))
    x = max(A)
    y = B[A.index(x)]
    ans = x + y
    print(ans)


if __name__ == "__main__":
    main()

import sys

input = sys.stdin.readline


def main():
    N = int(eval(input()))
    x = y = 0
    for _ in range(N):
        A, B = list(map(int, input().split()))
        if A > x:
            x = A
            y = B
    ans = x + y
    print(ans)


if __name__ == "__main__":
    main()

-    A = [None] * N -    B = [None] * N -    for i in range(N): -        A[i], B[i] = list(map(int, input().split())) -    x = max(A) -    y = B[A.index(x)] +    x = y = 0 +    for _ in range(N): +        A, B = list(map(int, input().split())) +        if A > x: +            x = A +            y = B