func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 110;   const int M = 10010;   int n, m;   char mat[N][M];   int dir[2] = {-1, 1};   long long solve() {     long long ans = 0;     int x = 0, y = 0, d = 1;     bool isLeft = true, isRight = true;     int pos[2] = {0, 0};     while (true) {       if (!isLeft && !isRight) return -1;       if (x == n - 1) return ans;       if (mat[x + 1][y] ==  . ) {         ans++;         x++;         isLeft = isRight = true;         pos[0] = pos[1] = y;       } else if (y == pos[d]) {         int ty = y + dir[d];         ans++;         if (ty < 0 || ty >= m || mat[x][ty] ==  # ) {           if (d == 0)             isLeft = false;           else             isRight = false;           d ^= 1;         } else {           pos[d] += dir[d];           if (mat[x][ty] ==  . )             y += dir[d];           else             d ^= 1;         }       } else {         ans += (long long)abs((long long)pos[d] - (long long)y);         y = pos[d];       }     }     return -1;   }   int main() {     while (scanf( %d%d%*c , &n, &m) != EOF) {       for (int i = 0; i < n; i++) gets(mat[i]);       long long ans = solve();       if (ans == -1)         puts( Never );       else         cout << ans << endl;     }     return 0;   }   