#include <bits/stdc++.h>
using namespace std;
const int maxn = 102;
const int maxm = 10010;
int n, m;
char s[maxn][maxm];
int dir[] = {1, -1};
char check(int y) { return y >= 0 && y < m; }
long long move(int &x, int &y, int &d) {
  long long ans = 0;
  int l = y, r = y;
  for (int c = -10 * m; c <= m && (l >= 0 || r < m); c++) {
    if (s[x + 1][y] == '.') {
      x++;
      return ans + 1;
    }
    if (d == 0) {
      if (r == y)
        y++, ans++;
      else
        ans += r - y, y = r;
    } else {
      if (l == y)
        y--, ans++;
      else
        ans += y - l, y = l;
    }
    if (check(y) == 0 || s[x][y] == '#')
      y -= dir[d], d ^= 1;
    else if (s[x][y] == '+')
      s[x][y] = '.', y -= dir[d], d ^= 1;
    r = max(r, y);
    l = min(l, y);
  }
  return -1;
}
long long solve() {
  long long ans = 0;
  int x = 0, y = 0, d = 0;
  while (x != n - 1) {
    int cur = move(x, y, d);
    if (cur < 0) return -1;
    ans += cur;
  }
  return ans;
}
int main() {
  while (scanf("%d%d", &n, &m) == 2) {
    for (int i = 0; i < n; i++) scanf("%s", s[i]);
    long long ans = solve();
    if (ans < 0)
      puts("Never");
    else
      cout << ans << endl;
  }
  return 0;
}
