#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 10, maxm = 10000 + 10;
long long n, m, drt = 1, x = 1, y = 1, ans = 0, dis = 0, o = 0;
char mat[maxn][maxm];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    mat[i][0] = '#';
    mat[i][m + 1] = '#';
    for (int j = 1; j <= m; j++) {
      cin >> mat[i][j];
    }
  }
  while (x != n) {
    if (mat[x][y + drt] == '#' && o == 2) {
      break;
    }
    if (mat[x + 1][y] == '.') {
      x++;
      dis = 0;
      o = 0;
    } else if (mat[x][y + drt] == '#') {
      drt *= (-1);
      y += (drt * dis);
      ans += dis;
      o++;
    } else if (mat[x][y + drt] == '+') {
      mat[x][y + drt] = '.';
      drt *= (-1);
      y += (drt * dis);
      ans += dis;
      o = 0;
    } else {
      y += drt;
      dis++;
      o = 0;
    }
    ans++;
  }
  if (o == 2) {
    cout << "Never" << endl;
  } else
    cout << ans << endl;
  return 0;
}
