#include<iostream>
using namespace std;
int H,W,a[10][10],c;
int main(){
cin>>H>>W;
for(int i=0;i<H;i++){for(int j=0;j<W;j++){cin>>a[i][j];c+=a[i][j];}}
cout<<c<<endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBILFcsYVsxMF1bMTBdLGM7CmludCBtYWluKCl7CgljaW4+Pkg+Plc7Cglmb3IoaW50IGk9MDtpPEg7aSsrKXtmb3IoaW50IGo9MDtqPFc7aisrKXtjaW4+PmFbaV1bal07Yys9YVtpXVtqXTt9fQoJY291dDw8Yzw8ZW5kbDsKCXJldHVybiAwOwp9