#include using namespace std; int main() { int H,W; cin >> H >> W; vector S(H); for(auto &s : S) cin >> s; int m = H+W-2,m2 = 1< dr(m); int d = 0; for(int k=0; k