#include <bits/stdc++.h>
using namespace std;
const int N = 100;
vector<int> wall[N];
vector<int> brick[N];
vector<int> hole[N];
int main() {
  int n, m;
  long long ans = 0;
  char c;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    wall[i].push_back(0);
    for (int j = 1; j <= m; j++) {
      cin >> c;
      if (c == '+') brick[i].push_back(j);
      if (c == '#') wall[i].push_back(j);
      if (c == '.' && i != 0) hole[i - 1].push_back(j);
    }
    wall[i].push_back(m + 1);
  }
  int pos = 1, d = 1;
  for (int i = 0; i < n - 1; i++) {
    long long add = 0;
    int L, R, h1, h2, j;
    stack<int> l, r;
    for (j = 0; j < wall[i].size() && wall[i][j] < pos; j++)
      ;
    L = wall[i][j - 1];
    l.push(L);
    for (j = wall[i].size() - 1; j >= 0 && wall[i][j] > pos; j--)
      ;
    R = wall[i][j + 1];
    r.push(R);
    for (j = 0; j < brick[i].size() && brick[i][j] < pos; j++)
      if (brick[i][j] > L) l.push(brick[i][j]);
    for (j = brick[i].size() - 1; j >= 0 && brick[i][j] > pos; j--)
      if (brick[i][j] < R) r.push(brick[i][j]);
    h1 = h2 = -1;
    for (j = 0; j < hole[i].size() && hole[i][j] <= pos; j++)
      ;
    h1 = j == 0 ? -1 : hole[i][j - 1];
    for (j = (int)hole[i].size() - 1; j >= 0 && hole[i][j] >= pos; j--)
      ;
    h2 = j == (int)hole[i].size() - 1 ? -1 : hole[i][j + 1];
    if (!(h1 > L && h1 < R)) h1 = -1;
    if (!(h2 > L && h2 < R)) h2 = -1;
    if (h1 == -1 && h2 == -1) {
      printf("Never");
      return 0;
    }
    while (1) {
      if (d == 0) {
        int e = l.top();
        if (e < h1 && h1 <= pos) {
          add += pos - h1;
          pos = h1;
          break;
        }
        add += pos - (e + 1) + 1;
        d = 1;
        pos = e + 1;
        if (l.size() != 1) l.pop();
      } else {
        int e = r.top();
        if (pos <= h2 && h2 < e) {
          add += h2 - pos;
          pos = h2;
          break;
        }
        add += (e - 1) - pos + 1;
        d = 0;
        pos = e - 1;
        if (r.size() != 1) r.pop();
      }
    }
    ans += add;
  }
  printf("%I64d", ans + n - 1);
  return 0;
}
