#include <bits/stdc++.h>
using namespace std;
template <class F, class T>
T convert(F a, int p = -1) {
  stringstream ss;
  if (p >= 0) ss << fixed << setprecision(p);
  ss << a;
  T r;
  ss >> r;
  return r;
}
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
T sqr(T x) {
  return x * x;
}
template <class T>
T cube(T x) {
  return x * x * x;
}
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
template <class T>
int cntbit(T s) {
  return s == 0 ? 0 : cntbit(s >> 1) + (s & 1);
}
const int bfsz = 1 << 16;
char bf[bfsz + 5];
int rsz = 0;
int ptr = 0;
char gc() {
  if (rsz <= 0) {
    ptr = 0;
    rsz = (int)fread(bf, 1, bfsz, stdin);
    if (rsz <= 0) return EOF;
  }
  --rsz;
  return bf[ptr++];
}
void ga(char &c) {
  c = EOF;
  while (!isalpha(c)) c = gc();
}
int gs(char s[]) {
  int l = 0;
  char c = gc();
  while (isspace(c)) c = gc();
  while (c != EOF && !isspace(c)) {
    s[l++] = c;
    c = gc();
  }
  s[l] = '\0';
  return l;
}
template <class T>
bool gi(T &v) {
  v = 0;
  char c = gc();
  while (c != EOF && c != '-' && !isdigit(c)) c = gc();
  if (c == EOF) return false;
  bool neg = c == '-';
  if (neg) c = gc();
  while (isdigit(c)) {
    v = v * 10 + c - '0';
    c = gc();
  }
  if (neg) v = -v;
  return true;
}
const long double PI = acos(-1.0);
const long double eps = 1e-9;
const int dr[] = {-1, 0, +1, 0};
const int dc[] = {0, +1, 0, -1};
const int inf = (int)1e9 + 5;
const long long linf = (long long)1e16 + 5;
const long long mod = (long long)(1e9 + 7 + eps);
int n, m;
char s[105][10005];
int f[105][10005][3];
pair<int, int> dad[105][10005][3];
long long res = 0;
pair<int, int> getdad(int r, int c, int id) {
  if (dad[r][c][id].first == r && dad[r][c][id].second == c)
    return dad[r][c][id];
  return dad[r][c][id] = getdad(dad[r][c][id].first, dad[r][c][id].second, id);
}
void xuly(int r, int c) {
  s[r][c] = '.';
  dad[r][c][1] = make_pair(r, c);
  dad[r][c][2] = make_pair(r, c);
  if (s[r][c + 1] == '.') {
    dad[r][c][1] = dad[r][c + 1][1];
    dad[r][c + 1][2] = make_pair(r, c);
  }
  if (c > 0 && s[r][c - 1] == '.') {
    dad[r][c][2] = dad[r][c - 1][2];
    dad[r][c - 1][1] = make_pair(r, c);
  }
  if (s[r + 1][c] == '.') {
    dad[r][c][1] = dad[r + 1][c][1];
    dad[r][c][2] = dad[r + 1][c][2];
  }
}
void go(int r, int c, int id) {
  if (r == n - 1) return;
  if (f[r][c][id] > 22000) {
    res = linf;
    return;
  }
  f[r][c][id]++;
  pair<int, int> P = getdad(r, c, id);
  if (P.first != r || P.second != c) {
    res += abs(P.first - r) + abs(P.second - c);
    go(P.first, P.second, id);
  } else {
    int u = (id == 1) ? 1 : -1;
    if (s[r][c + u] == '+') xuly(r, c + u);
    res++;
    go(P.first, P.second, 3 - id);
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < (n); ++i) {
    scanf("%s", s[i]);
    for (int j = 0; j < (m); ++j)
      if (s[i][j] == '.') {
        dad[i][j][1] = make_pair(i, j);
        dad[i][j][2] = make_pair(i, j);
      }
  }
  for (int i = 0; i < (n - 1); ++i)
    for (int j = 0; j < (m); ++j)
      if (s[i][j] == '.') {
        if (s[i][j + 1] == '.') dad[i][j][1] = dad[i][j + 1][1];
        if (j > 0 && s[i][j - 1] == '.') dad[i][j][2] = dad[i][j - 1][2];
        if (s[i + 1][j] == '.') {
          dad[i][j][1] = dad[i + 1][j][1];
          dad[i][j][2] = dad[i + 1][j][2];
        }
      }
  memset(f, 0, sizeof(f));
  go(0, 0, 1);
  if (res >= linf)
    cout << "Never";
  else
    cout << res;
  return 0;
}
