#include // clang-format off using namespace std; using ll=long long; using ull=unsigned long long; using pll=pair; const ll INF=4e18; void print0(){}; template void print0(H h,T... t){cout<void print1(H h,T... t){print0(h);if(sizeof...(T)>0)print0(" ");print1(t...);} void ioinit() { cout<> H >> W; for (ll r = 0; r < H; r++) { for (ll c = 0; c < W; c++) { cin >> tbl[r][c]; } } ll ini = 0; if (tbl[0][0] == 'o') { ini = 1; } if (tbl[0][0] == 'x') { ini = -1; } print1(dp(0, 0, ini)); return 0; }