#include using namespace std; #define ll long long #define rep(i,n) for(int i = 0; i>n>>m; ll total = 0; int minm = INT32_MAX; rep(i,n){ rep(j,m){ int val;cin>>val; if((i%2!=1||j%2!=1)&&(i!=0||j!=0)&&(i!=n-1||j!=m-1)){ minm = min(minm, val); } total+=val; } } if((n&1)||(m&1)) minm = 0; cout<