#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const double EPS = 1e-9, INF = 1e12;
int h, w;
int block[100][10010], wall[100][10010];
string in[101];
int main() {
  cin >> h >> w;
  for (int i = 0; i < (int)h; i++) {
    cin >> in[i];
    for (int j = 0; j < (int)w; j++) {
      block[i][j + 1] = block[i][j] + (in[i][j] == '+');
      wall[i][j + 1] = wall[i][j] + (in[i][j] == '#');
    }
  }
  in[h] = string(w, '#');
  in[h][w - 1] = '.';
  long long ans = 0;
  int y = 0, x = 0, dir = 1;
  while (y != h - 1) {
    int l = x, r = x;
    map<pair<int, int>, int> cnt;
    while (1) {
      if (++cnt[make_pair(l, r)] > 4) {
        cout << "Never" << endl;
        return 0;
      }
      if (dir == 1) {
        while (r < w - 1 && in[y][r + 1] == '.') {
          if (in[y + 1][r] == '.') {
            y++;
            x = r;
            ans++;
            goto NEXT;
          }
          r++;
          ans++;
        }
        if (in[y + 1][r] == '.') {
          y++;
          x = r;
          ans++;
          goto NEXT;
        }
        if (r < w - 1 && in[y][r + 1] == '+') in[y][r + 1] = '.';
        dir = -1;
        ans += r - l + 1;
        continue;
      }
      if (dir == -1) {
        while (l > 0 && in[y][l - 1] == '.') {
          if (in[y + 1][l] == '.') {
            y++;
            x = l;
            ans++;
            goto NEXT;
          }
          l--;
          ans++;
        }
        if (in[y + 1][l] == '.') {
          y++;
          x = l;
          ans++;
          goto NEXT;
        }
        if (l > 0 && in[y][l - 1] == '+') in[y][l - 1] = '.';
        dir = 1;
        ans += r - l + 1;
      }
    }
  NEXT:;
  }
  cout << ans << endl;
  return 0;
}
