from itertools import permutations n,m=map(int,input().split()) s=[list(map(int,input().split())) for _ in range(m)] print(max([sum([c if t[a]