#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, m;
  cin >> n >> m;
  vector<vector<char> > matr(n + 2, vector<char>(m + 2, '#'));
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) cin >> matr[i][j];
  vector<vector<bool> > used(n + 2, vector<bool>(m + 2));
  bool right = true;
  long i = 1, j = 1;
  long lastj = 0;
  long long _time = 0;
  long l = 1, r = 1;
  while (i < n) {
    _time++;
    if (right) {
      for (;;) {
        _time += r - j;
        j = r;
        if (matr[i + 1][j] == '.') {
          i++;
          l = j;
          r = j;
          used[i + 1][j] = true;
          break;
        }
        if (matr[i][j + 1] == '.') {
          r = j + 1;
          used[i][r] = true;
        }
        if (matr[i][j + 1] == '+') {
          matr[i][j + 1] = '.';
          used[i][j + 1] = true;
          right = false;
          break;
        }
        if (matr[i][j + 1] == '#') {
          used[i][j + 1] = true;
          right = false;
          break;
        }
      }
      continue;
    }
    for (;;) {
      _time += j - l;
      j = l;
      if (matr[i + 1][j] == '.') {
        i++;
        l = j;
        r = j;
        used[i + 1][j] = true;
        break;
      }
      if (matr[i][j - 1] == '.') {
        l = j - 1;
        used[i][l] = true;
      }
      if (matr[i][j - 1] == '+') {
        matr[i][j - 1] = '.';
        used[i][j - 1] = true;
        right = true;
        break;
      }
      if (used[i][l - 1] && used[i][r + 1] && matr[i][l - 1] == '#' &&
          matr[i][r + 1] == '#') {
        cout << "Never" << endl;
        return 0;
      }
      if (matr[i][j - 1] == '#') {
        right = true;
        used[i][j - 1] = true;
        break;
      }
    }
  }
  cout << _time << endl;
  return 0;
}
