#include <bits/stdc++.h>
using namespace std;
const int maxh = (int)1e2, maxw = (int)1e4 + 2;
int a[maxh][maxw];
int cur[2][maxw];
int main() {
  int h, w;
  while (scanf("%d%d", &h, &w) >= 1) {
    for (int i = 0; i < h; i++) {
      for (int j = 0; j < w; j++) {
        char ch;
        scanf(" %c", &ch);
        a[i][j + 1] = ch == '.' ? 0 : ch == '+' ? 1 : 2;
      }
      a[i][0] = a[i][w + 1] = 2;
    }
    w += 2;
    assert(h <= maxh && w <= maxw);
    bool fail = 0;
    long long res = 0;
    int cpos = 1;
    int cit = 1;
    for (int i = 0; i < h - 1; i++) {
      int r[2], first[2];
      for (int dir = -1, it = 0; dir <= 1; dir += 2, it++) {
        r[it] = 0;
        first[it] = -1;
        for (int j = cpos;; j += dir) {
          if (a[i][j]) cur[it][r[it]++] = j;
          if (a[i][j] == 2) break;
          if (!a[i + 1][j] && first[it] == -1) first[it] = j;
        }
      }
      if (first[0] == -1 && first[1] == -1) {
        fail = 1;
        break;
      }
      int l[2] = {0, 0};
      while (1) {
        if (first[cit] != -1 &&
            abs(first[cit] - cpos) < abs(cur[cit][l[cit]] - cpos)) {
          res += abs(first[cit] - cpos) + 1;
          cpos = first[cit];
          break;
        }
        res += abs(cur[cit][l[cit]] - cpos);
        cpos = cur[cit][l[cit]] + (cit ? -1 : 1);
        l[cit] = min(l[cit] + 1, r[cit] - 1);
        cit = !cit;
      }
    }
    if (fail)
      printf("Never\n");
    else
      printf(
          "%lld"
          "\n",
          res);
    break;
  }
  return 0;
}
