#include <bits/stdc++.h>
using namespace std;
int n, m;
char a[101][101 * 101];
long long res;
void readin() {
  scanf("%d %d\n", &n, &m);
  for (int i = 1; i <= n; i++) gets(a[i]);
}
void process(int x, int y, char d) {
  if (x == n) {
    cout << res;
    return;
  }
  if (a[x + 1][y] == '.') {
    process(x + 1, y, d);
    return;
  }
  int l = y, r = y;
  bool b1, b2;
  while (true) {
    b1 = false;
    b2 = false;
    if (l > 0)
      b1 = (a[x][l - 1] == '#');
    else
      b1 = (l == 0);
    if (r + 1 < m)
      b2 = (a[x][r + 1] == '#');
    else
      b2 = (r == (m - 1));
    if ((b1 == true) && (b2 == true)) {
      printf("Never");
      return;
    }
    if (d == 'r') {
      for (r = r; r < m; r++) {
        if (a[x + 1][r] == '.') {
          res += (r - l);
          process(x + 1, r, d);
          return;
        }
        if (r + 1 < m) {
          if ((a[x][r + 1] == '+') || (r + 1 == m)) {
            res += (r - l + 1);
            d = 'l';
            a[x][r + 1] = '.';
            break;
          }
          if (a[x][r + 1] == '#') {
            res += (r - l + 1);
            d = 'l';
            break;
          }
        } else {
          res += (r - l + 1);
          d = 'l';
          break;
        }
      }
    } else {
      for (l = l; l >= 0; l--) {
        if (a[x + 1][l] == '.') {
          res += (r - l);
          process(x + 1, l, d);
          return;
        }
        if (l > 0) {
          if (a[x][l - 1] == '+') {
            res += (r - l + 1);
            d = 'r';
            a[x][l - 1] = '.';
            break;
          }
          if (a[x][l - 1] == '#') {
            res += (r - l + 1);
            d = 'r';
            break;
          }
        } else {
          res += (r - l + 1);
          d = 'r';
          break;
        }
      }
    }
  }
}
int main() {
  readin();
  res = n - 1;
  process(1, 0, 'r');
  return 0;
}
