#include <bits/stdc++.h>
using namespace std;
struct Lista {
  Lista *st, *dr;
  int d;
  bool cade, liber, blocat;
  Lista(Lista *prev, int _p, int _cade, int _liber, int _blocat) {
    st = prev, dr = 0;
    if (st) st->dr = this;
    d = _p;
    cade = _cade, liber = _liber, blocat = _blocat;
  }
  void delete_me() {
    if (dr) dr->st = st;
    if (st) st->dr = dr;
    delete this;
  }
};
long long ans;
pair<int, int> fall(Lista *x, bool dir);
int type[110][10010];
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i(1); i <= n; i++) {
    for (int j(1); j <= m; j++) {
      char c;
      cin >> c;
      if (c == '.')
        type[i][j] = 1;
      else if (c == '+')
        type[i][j] = 2;
    }
  }
  int p(1), dir(1);
  for (int i(1); i < n; i++) {
    Lista *x = new Lista(0, 0, 0, 0, 0), *y(x);
    for (int j(1); j <= m; j++)
      y = new Lista(y, j, type[i + 1][j] == 1, type[i][j] == 1,
                    type[i][j] == 2);
    y = new Lista(y, m + 1, 0, 0, 0);
    while (p--) x = x->dr;
    pair<int, int> q = fall(x, dir);
    dir = q.second;
    p = q.first;
    if (p == -1) {
      cout << "Never";
      return 0;
    }
  }
  cout << ans + n - 1ll << '\n';
  return 0;
}
pair<int, int> fall(Lista *x, bool dir) {
  int extremity(0);
  while (extremity != 3) {
    if (x->cade) return {x->d, dir};
    if (dir) {
      if (x->dr->liber) {
        ans += (x->dr->d - x->d);
        x = x->dr;
        x->st->delete_me();
      } else if (x->dr->blocat) {
        ans += 2 * (x->dr->d - x->d) - 1;
        x->dr->liber = 1;
        dir = 0;
      } else {
        ans += 2 * (x->dr->d - x->d) - 1;
        extremity |= 2;
        dir = 0;
      }
    } else {
      if (x->st->liber) {
        ans += (x->d - x->st->d);
        x = x->st;
        x->dr->delete_me();
      } else if (x->st->blocat) {
        ans += 2 * (x->d - x->st->d) - 1;
        x->st->liber = 1;
        dir = 1;
      } else {
        ans += 2 * (x->d - x->st->d) - 1;
        extremity |= 1;
        dir = 1;
      }
    }
  }
  return {-1, -1};
}
