#include <bits/stdc++.h>
using namespace std;
char room[111][11111];
long long next_level(int i, int& cur, int& dir) {
  long long ct = 0;
  int lasthit = cur;
  int lastop = 0;
  while (1) {
    ct++;
    if (room[i + 1][cur] == '.') break;
    if (room[i][cur + dir] == '#') {
      ct += abs(cur - lasthit);
      swap(lasthit, cur);
      dir = -dir;
      if (lastop) {
        cur = -1;
        break;
      }
      lastop = 1;
    } else if (room[i][cur + dir] == '.') {
      cur += dir;
      lastop = 0;
    } else if (room[i][cur + dir] == '+') {
      ct += abs(cur - lasthit);
      room[i][cur + dir] = '.';
      swap(lasthit, cur);
      dir = -dir;
      lastop = 0;
    }
  }
  return ct;
}
int main(void) {
  int n = 0;
  int m = 0;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    room[i][0] = '#';
    scanf("%s", room[i] + 1);
    room[i][m + 1] = '#';
  }
  int cur = 1;
  int dir = 1;
  long long ans = 0;
  bool never = false;
  for (int i = 0; i < n - 1; i++) {
    ans += next_level(i, cur, dir);
    if (cur == -1) {
      never = true;
      break;
    }
  }
  if (never)
    puts("Never");
  else
    printf("%I64d\n", ans);
  while (getchar() != EOF)
    ;
  return 0;
}
