#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 >= 0; 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 beton = 0;
  while (1) {
    if (f[y - 1][x] == '.') {
      y--;
      chDx = 0;
      beton = 0;
    } else if (f[y][x + d] == '.')
      x += d;
    else {
      if (f[y][x + d] == '+') {
        f[y][x + d] = '.';
        beton = 0;
      } else {
        if (beton) break;
        beton = 1;
      }
      d = -d;
      int xx = x;
      if (chDx) {
        int l = abs(x - chDx);
        k += l;
        x += d * l;
      }
      chDx = xx;
    }
    k++;
    if (y == 0) {
      cout << k << endl;
      return 0;
    }
  }
  cout << "Never" << endl;
}
