#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
const double PI = acos(-1);
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
int x, y, now, d[2], w[2], a[101][10001];
long long ans;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (j == 1) getchar();
      switch (getchar()) {
        case '.':
          break;
        case '+':
          a[i][j] = 1;
          break;
        case '#':
          a[i][j] = 2;
          break;
      }
    }
  }
  d[0] = 1, d[1] = -1;
  x = y = w[0] = w[1] = 1;
  for (int T = 1E7; T >= 0; --T) {
    if (x == n) {
      printf("%I64d", ans);
      return 0;
    }
    if (!a[x + 1][y])
      ++x, w[0] = w[1] = y;
    else if (y == w[now]) {
      if ((1 <= y + d[now]) && (y + d[now] <= m) && (a[x][y + d[now]] < 2)) {
        w[now] += d[now];
        if (!a[x][y + d[now]]) {
          y += d[now];
        } else
          now ^= 1;
      } else
        now ^= 1;
    } else {
      ans += (long long)abs(w[now] - y) - 1;
      y = w[now];
    }
    ++ans;
  }
  printf("Never");
  return 0;
}
