n,m = map(int,input().split()) b = [0]*n for i in range(n): b[i] = sum(list(map(int,input().split()))) b = sorted(b,reverse=True) print(b[0])