#include <bits/stdc++.h>
using namespace std;
ifstream fin(“ciocolata.in”);
ofstream fout(“ciocolata.out”);
using VI = vector<long long>;
using VVI = vector<VI>;
int is = 501, js = 501, iif = 501, jf = 501;
int p1, p2, p3, p4;
long long v = 0, c;
int main()
{
int n, m; fin >> n >> m;
VVI a = VVI);
for (int i = 1; i <= n; ++i)
for (int j = 1; j <= m; ++j)
{
fin >> a[i][j];
a[i][j] += a[i – 1][j];
}