# tenka1-2017-beginnerB - Different Distribution

import sys

input = sys.stdin.readline



def main():

    n = int(eval(input()))

    A = sorted(tuple(map(int, input().rstrip().split())) for _ in range(n))

    print((A[-1][0] + A[-1][1]))





if __name__ == "__main__":

    main()
# tenka1-2017-beginnerB - Different Distribution

def main():

    N, *AB = list(map(int, open(0).read().split()))

    A = [(i, j) for i, j in zip(*[iter(AB)] * 2)]

    A.sort()

    ans = sum(A[-1])

    print(ans)





if __name__ == "__main__":

    main()
# tenka1-2017-beginnerB - Different Distribution
import sys

input = sys.stdin.readline


def main():
    n = int(eval(input()))
    A = sorted(tuple(map(int, input().rstrip().split())) for _ in range(n))
    print((A[-1][0] + A[-1][1]))


if __name__ == "__main__":
    main()

# tenka1-2017-beginnerB - Different Distribution
def main():
    N, *AB = list(map(int, open(0).read().split()))
    A = [(i, j) for i, j in zip(*[iter(AB)] * 2)]
    A.sort()
    ans = sum(A[-1])
    print(ans)


if __name__ == "__main__":
    main()

-import sys - -input = sys.stdin.readline - - -    n = int(eval(input())) -    A = sorted(tuple(map(int, input().rstrip().split())) for _ in range(n)) -    print((A[-1][0] + A[-1][1])) +    N, *AB = list(map(int, open(0).read().split())) +    A = [(i, j) for i, j in zip(*[iter(AB)] * 2)] +    A.sort() +    ans = sum(A[-1]) +    print(ans)