def main():

    n = int(eval(input()))

    ab = [] # type:[[int]] 

    for i in range(n):

        ab.append([int(x) for x in input().split()])

    a, b = max(ab, key=lambda x: x[0])

    print((a + b))





if __name__ == "__main__":

    main()
def main():

    n = int(eval(input()))

    max_a, max_b = 0, 0 # type:int

    for _ in range(n):

        a, b = input().split()

        a = int(a)

        if max_a < a:

            max_a = a

            max_b = int(b)

    print((max_a + max_b))





if __name__ == "__main__":

    main()
def main():
    n = int(eval(input()))
    ab = []  # type:[[int]]
    for i in range(n):
        ab.append([int(x) for x in input().split()])
    a, b = max(ab, key=lambda x: x[0])
    print((a + b))


if __name__ == "__main__":
    main()

def main():
    n = int(eval(input()))
    max_a, max_b = 0, 0  # type:int
    for _ in range(n):
        a, b = input().split()
        a = int(a)
        if max_a < a:
            max_a = a
            max_b = int(b)
    print((max_a + max_b))


if __name__ == "__main__":
    main()

-    ab = []  # type:[[int]] -    for i in range(n): -        ab.append([int(x) for x in input().split()]) -    a, b = max(ab, key=lambda x: x[0]) -    print((a + b)) +    max_a, max_b = 0, 0  # type:int +    for _ in range(n): +        a, b = input().split() +        a = int(a) +        if max_a < a: +            max_a = a +            max_b = int(b) +    print((max_a + max_b))