#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, y = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') y = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * y;
}
long long n, m, tim = 0;
char Map[105][10005];
void solve() {
  n = read(), m = read();
  for (long long i = 1; i <= n; i++) {
    scanf("%s", Map[i] + 1);
    Map[i][0] = Map[i][m + 1] = '#';
  }
  long long now = 1, fx = 1;
  for (long long i = 1; i < n; i++) {
    if (Map[i + 1][now] == '.') {
      tim++;
      continue;
    }
    long long l = now - 1, r = now + 1;
    while (1) {
      if (Map[i][l] == '#' && Map[i][r] == '#')
        return (void)(printf("Never\n"));
      tim += r - l - 2;
      if (fx == 1) {
        while (Map[i][r] == '.' && Map[i + 1][r] != '.') r++, tim++;
        if (Map[i][r] == '.') {
          now = r, tim += 2;
          break;
        }
        if (Map[i][r] == '+')
          fx = -fx, tim++, Map[i][r] = '.';
        else if (Map[i][r] == '#')
          fx = -fx, tim++;
      } else {
        while (Map[i][l] == '.' && Map[i + 1][l] != '.') l--, tim++;
        if (Map[i][l] == '.') {
          now = l, tim += 2;
          break;
        }
        if (Map[i][l] == '+')
          fx = -fx, tim++, Map[i][l] = '.';
        else if (Map[i][l] == '#')
          fx = -fx, tim++;
      }
    }
  }
  return (void)(printf("%lld\n", tim));
}
signed main() { solve(); }
