#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  char f[100][10000 + 2];
  cin >> n >> m;
  for (int y = n - 1; y > -1; y--) {
    f[y][0] = '#';
    f[y][m + 1] = '#';
    for (int x = 0; x < m; x++) cin >> f[y][x + 1];
  }
  long long k = 0;
  int x = 1, y = n - 1, d = 1, chDx = 0;
  bool fl = false;
  while (true) {
    if (f[y - 1][x] == '.') {
      y--;
      chDx = 0;
      fl = false;
    } else if (f[y][x + d] == '+') {
      f[y][x + d] = '.';
      d = -d;
      fl = false;
      int temp = x;
      if (chDx) {
        k += abs(x - chDx);
        x += d * abs(x - chDx);
      }
      chDx = temp;
    } else if (f[y][x + d] == '#') {
      if (fl) break;
      d = -d;
      fl = true;
      int temp = x;
      if (chDx) {
        k += abs(x - chDx);
        x += d * abs(x - chDx);
      }
      chDx = temp;
    } else
      x += d;
    k++;
    if (y == 0) break;
  }
  if (y == 0)
    cout << k << endl;
  else
    cout << "Never" << endl;
}
