#include
#include
using namespace std;
#define ll long long
#define ld long double
signed main() {
ll n,m;
cin >> n >> m;
ld a[n][m];
ld min_elem = LLONG_MAX;
ll i_index;
for(ll i = 0; i < n; i++){
for(ll j = 0; j < m; j++){
cin >> a[i][j];
if(a[i][j] < min_elem){
min_elem = a[i][j];
i_index = i;
}
}
}
ld ans = 0;
for(ll j = 0; j < m; j++)
ans += a[i_index][j];
cout << ans << "\n";</strong>
}