#include <bits/stdc++.h>
long long ans;
int N, M, mat[105][10005];
char eat;
void solve() {
  int x = 0, i = 0, j = 0, mode = 0;
  ans = 0;
  while (x < N - 1) {
    if (mode == 0) {
      if (mat[x + 1][j] == 0) {
        ans++, i = j, x++;
        continue;
      }
    } else {
      if (mat[x + 1][i] == 0) {
        ans++, j = i, x++;
        continue;
      }
    }
    if ((i == 0 || mat[x][i - 1] == 2) && (j == M - 1 || mat[x][j + 1] == 2)) {
      ans = -1;
      return;
    }
    if (mode == 0) {
      if (j == M - 1 || mat[x][j + 1] != 0) {
        mode = 1, ans += j - i + 1;
        if (j < M - 1 && mat[x][j + 1] == 1) mat[x][j + 1] = 0;
      } else {
        ans++, j++;
        if (mat[x + 1][j] == 0) ans++, i = j, x++;
      }
    } else {
      if (i == 0 || mat[x][i - 1] != 0) {
        mode = 0, ans += j - i + 1;
        if (i > 0 && mat[x][i - 1] == 1) mat[x][i - 1] = 0;
      } else {
        ans++, i--;
        if (mat[x + 1][i] == 0) ans++, j = i, x++;
      }
    }
  }
}
int main() {
  while (scanf(" %d %d", &N, &M) != EOF) {
    for (int i = 0; i < N; i++) {
      for (int j = 0; j < M; j++) {
        scanf(" %c", &eat);
        if (eat == '.')
          mat[i][j] = 0;
        else if (eat == '+')
          mat[i][j] = 1;
        else
          mat[i][j] = 2;
      }
    }
    solve();
    if (ans < 0)
      printf("Never\n");
    else
      printf("%I64d\n", ans);
  }
  return 0;
}
