#include <bits/stdc++.h>
using namespace std;
inline int abs(int x) { return x < 0 ? -x : x; }
int main() {
  int n, m;
  cin >> n >> m;
  vector<string> floor(n);
  for (int i = 0; i < (int)(n); ++i)
    cin >> floor[i], floor[i] = "#" + floor[i] + "#";
  long long x = 1, dir = 1, ans = 0;
  for (int i = 0; i < (int)(n); ++i) {
    if (i == n - 1) break;
    int a = 0, b = 0, xx;
    xx = x;
    while (true) {
      if (floor[i][xx] == '+') ++a;
      if (floor[i][xx] == '#') {
        a = -1;
        break;
      }
      if (floor[i + 1][xx] == '.') break;
      xx += dir;
    }
    xx = x;
    while (true) {
      if (floor[i][xx] == '+') ++b;
      if (floor[i][xx] == '#') {
        b = -1;
        break;
      }
      if (floor[i + 1][xx] == '.') break;
      xx -= dir;
    }
    if (a == -1 && b == -1) {
      cout << "Never" << endl;
      return 0;
    }
    if (b == -1 || (a != -1 && a <= b)) {
      xx = x;
      b = 0;
      while (true) {
        if (floor[i][xx] == '+') ans += 2 * abs(x - xx) - 1, ++b;
        if (b == a) break;
        if (floor[i][xx] == '#') {
          ans += (a - b) * (2 * abs(x - xx) - 1);
          break;
        }
        xx -= dir;
      }
      xx = x;
      while (true) {
        if (floor[i][xx] == '+') ans += 2 * abs(xx - x) - 1;
        if (floor[i + 1][xx] == '.') {
          ans += abs(xx - x);
          x = xx;
          break;
        }
        xx += dir;
      }
    } else {
      xx = x;
      a = 0;
      while (true) {
        if (floor[i][xx] == '+') ans += 2 * abs(xx - x) - 1, ++a;
        if (a == b + 1) break;
        if (floor[i][xx] == '#') {
          ans += (b - a + 1) * (2 * abs(xx - x) - 1);
          break;
        }
        xx += dir;
      }
      xx = x;
      while (true) {
        if (floor[i][xx] == '+') ans += 2 * abs(x - xx) - 1;
        if (floor[i + 1][xx] == '.') {
          ans += abs(x - xx);
          x = xx;
          dir = -dir;
          break;
        }
        xx -= dir;
      }
    }
    ++ans;
  }
  cout << ans << endl;
}
