def main():

    n = int(eval(input()))

    max_a, max_b = 0, 0 # type:int

    for _ in range(n):

        a, b = list(map(int, input().split(' ')))

        # a = int(a)

        if max_a < a:

            max_a = a

            max_b = b # int(b)

    print((max_a + max_b))

 

 

if __name__ == "__main__":

    main()
import sys

from sys import stdin

input = stdin.readline



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()))
    max_a, max_b = 0, 0  # type:int
    for _ in range(n):
        a, b = list(map(int, input().split(" ")))
        # a = int(a)
        if max_a < a:
            max_a = a
            max_b = b  # int(b)
    print((max_a + max_b))


if __name__ == "__main__":
    main()

import sys
from sys import stdin

input = stdin.readline


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()

+import sys +from sys import stdin + +input = stdin.readline + + -        a, b = list(map(int, input().split(" "))) -        # a = int(a) +        a, b = input().split() +        a = int(a) -            max_b = b  # int(b) +            max_b = int(b)