n = int(input()) an = [] for i in range(n): ipt = list(map(int, input().split(' '))) if len(ipt) > 1: print('assert') exit() an.append(ipt[0]) print(max(ipt) + min(ipt))