#include <bits/stdc++.h>

#define REP(i,n) for (int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()

using namespace std;

int main() {
    while (true) {
        int n, m;
        cin >> n >> m;
        if (n == 0)
            break;
        vector<int> scores(n, 0);
        REP(i, m) REP(j, n) {
            int p;
            cin >> p;
            scores[j] += p;
       }
       cout << *max_element(all(scores)) << endl;
    }
    return 0;
}
