#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, i, x, dir, left, right, xnext, seconds, leftend, rightend;
  char *current, *below, *ct;
  cin >> n >> m;
  while (cin.get() != '\n')
    ;
  current = new char[m + 2];
  below = new char[m + 2];
  current[0] = current[m + 1] = '#';
  below[0] = below[m + 1] = '#';
  for (i = 1; i <= m; i++) current[i] = cin.get();
  --n;
  x = 1;
  dir = 1;
  seconds = 0;
  do {
    while (cin.get() != '\n')
      ;
    for (i = 1; i <= m; i++) {
      below[i] = cin.get();
    }
    left = right = x;
    leftend = rightend = 0;
    while (below[x] != '.') {
      xnext = x + dir;
      if (leftend && rightend) {
        cout << "Never\n";
        return 0;
      }
      if (current[xnext] == '.') {
        x = xnext;
        seconds++;
      } else if (current[xnext] == '+') {
        current[xnext] = '.';
        if (dir == -1) {
          left = x;
          seconds += right - x + 1;
          x = right;
        } else {
          right = x;
          seconds += x - left + 1;
          x = left;
        }
        if (below[x] != '.') dir = -dir;
      } else if (current[xnext] == '#') {
        if (dir == -1) {
          left = x;
          leftend = 1;
          seconds += right - x + 1;
          x = right;
        } else {
          right = x;
          rightend = 1;
          seconds += x - left + 1;
          x = left;
        }
        if (below[x] != '.') dir = -dir;
      }
    }
    seconds++;
    ct = current;
    current = below;
    below = ct;
  } while (--n);
  cout << seconds << endl;
  return 0;
};
