#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001LL int main(){ int h,w; cin>>h>>w; int X = 0,Y = 0; vector> a(h,vector(w)); rep(i,h){ rep(j,w){ cin>>a[i][j]; } } rep(i,h){ int c = 0; rep(j,w)c ^= a[i][j]; X += c; } rep(i,w){ int c = 0; rep(j,h)c ^= a[j][i]; Y += c; } cout<