#include <bits/stdc++.h>
using namespace std;
using Int = long long;
int PREP = (cin.tie(nullptr), ios::sync_with_stdio(false), cout << fixed << setprecision(9), 0);
//int SEGV = getenv("D") || (exit(system("D= SEGFAULT_SIGNALS=all catchsegv ./prog.exe") >> 8), 0);
int main() {
    for (;;) {
        int N, M; cin >> N >> M;
        if (N == 0 && M == 0) break;
        vector<int> score(N);
        for (int i = 0; i < M; i++) {
            for (int j = 0; j < N; j++) {
                int p; cin >> p;
                score[j] += p;
            }
        }
        cout << *max_element(begin(score), end(score)) << '\n';
    }
    return 0;
}

