#include<stdio.h>
//#include <utility>
void score_sum(int n,int m,int score[]){
	int L[1005][55];
	for(int i=0;i<m;++i)
		for(int j=0;j<n;++j){
			scanf("%d",&L[i][j]);
			score[j]+=L[i][j];}
}
int bub(int L[],int len){
	int max=-1;
	for(int i=0;i<len;++i)
		if(L[i]>max) max=L[i];
	return max;}
int main(){
	int n,m;
	int score[1005];
	while(1){
		memset(score,0,sizeof(score));
		scanf("%d%d",&n,&m);
		if(n&&m) {
			score_sum(n,m,score);
			printf("%d\n",bub(score,n));}
		else break;}
	return 0;
}
