# -*- coding: utf-8 -*-



# Tenka1 Programmer Beginner Contest

# Problem B



if __name__ == '__main__':

    n = int(eval(input()))

    worst_rank = -1

    worst_score = float('inf')



    # See:

    # https://beta.atcoder.jp/contests/tenka1-2017-beginner/submissions/1637273

    for i in range(n):

        ai, bi = list(map(int, input().split()))

        worst_rank = max(worst_rank, ai)

        worst_score = min(worst_score, bi)



    print((worst_rank + worst_score))

# -*- coding: utf-8 -*-



# Tenka1 Programmer Beginner Contest

# Problem B



if __name__ == '__main__':

    n = int(eval(input()))

    worst_rank, worst_score = 0, 0



    # See:

    # https://beta.atcoder.jp/contests/tenka1-2017-beginner/submissions/1637273

    # https://beta.atcoder.jp/contests/tenka1-2017-beginner/submissions/1655004

    for i in range(n):

        ai, bi = list(map(int, input().split()))



        if ai > worst_rank:

            worst_rank = ai

            worst_score = bi



    print((worst_rank + worst_score))

# -*- coding: utf-8 -*-
# Tenka1 Programmer Beginner Contest
# Problem B
if __name__ == "__main__":
    n = int(eval(input()))
    worst_rank = -1
    worst_score = float("inf")
    # See:
    # https://beta.atcoder.jp/contests/tenka1-2017-beginner/submissions/1637273
    for i in range(n):
        ai, bi = list(map(int, input().split()))
        worst_rank = max(worst_rank, ai)
        worst_score = min(worst_score, bi)
    print((worst_rank + worst_score))

# -*- coding: utf-8 -*-
# Tenka1 Programmer Beginner Contest
# Problem B
if __name__ == "__main__":
    n = int(eval(input()))
    worst_rank, worst_score = 0, 0
    # See:
    # https://beta.atcoder.jp/contests/tenka1-2017-beginner/submissions/1637273
    # https://beta.atcoder.jp/contests/tenka1-2017-beginner/submissions/1655004
    for i in range(n):
        ai, bi = list(map(int, input().split()))
        if ai > worst_rank:
            worst_rank = ai
            worst_score = bi
    print((worst_rank + worst_score))

-    worst_rank = -1 -    worst_score = float("inf") +    worst_rank, worst_score = 0, 0 +    # https://beta.atcoder.jp/contests/tenka1-2017-beginner/submissions/1655004 -        worst_rank = max(worst_rank, ai) -        worst_score = min(worst_score, bi) +        if ai > worst_rank: +            worst_rank = ai +            worst_score = bi