#include <bits/stdc++.h>
using namespace std;
const int INF = int(1e9);
const double EPS = 1e-8;
const long long INF64 = (long long)(1e18) + 1, md = 1000000007ll;
int n, m, p;
int fl, fr, f = 0;
string s[101];
vector<pair<int, int> > l, r;
long long t = 0;
int main() {
  scanf("%d %d", &n, &m);
  for (long i = 0; i < n; i++) cin >> s[i];
  p = 0;
  for (long i = 0; i < n - 1; i++) {
    fl = fr = -1;
    l.clear();
    r.clear();
    if (s[i + 1][p] == '.') {
      t++;
      continue;
    }
    for (long j = p + 1; j < m; j++) {
      if (s[i][j] == '+')
        r.push_back(make_pair(j, 0));
      else if (s[i][j] == '#') {
        r.push_back(make_pair(j, 1));
        break;
      }
      if (s[i + 1][j] == '.') {
        fr = j;
        break;
      }
    }
    for (int j = p - 1; j >= 0; j--) {
      if (s[i][j] == '+')
        l.push_back(make_pair(j, 0));
      else if (s[i][j] == '#') {
        l.push_back(make_pair(j, 1));
        break;
      }
      if (s[i + 1][j] == '.') {
        fl = j;
        break;
      }
    }
    if (fr < 0 && fl < 0) {
      printf("Never");
      return 0;
    }
    l.push_back(make_pair(-1, 1));
    r.push_back(make_pair(m, 1));
    reverse(l.begin(), l.end());
    reverse(r.begin(), r.end());
    while (1) {
      if (f == 0) {
        if (fr != -1 && r.back().first > fr) {
          t += fr - p;
          p = fr;
          break;
        } else {
          t += r.back().first - p;
          p = r.back().first - 1;
          if (r.back().second != 1) r.pop_back();
        }
      } else {
        if (l.back().first < fl) {
          t += p - fl;
          p = fl;
          break;
        } else {
          t += p - l.back().first;
          p = l.back().first + 1;
          if (l.back().second != 1) l.pop_back();
        }
      }
      f ^= 1;
    }
    t++;
  }
  printf("%I64d", t);
  return 0;
}
