#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  string map[n];
  for (int i = 0; i < n; i++) {
    cin >> map[i];
  }
  int f = 0;
  char dir = 'd';
  int pos = 0;
  long long int sum = 0;
  int turn = 0;
  int last = -1;
  while (f != n - 1) {
    if (map[f + 1][pos] == '.') {
      f++;
      turn = 0;
      last = -1;
    } else {
      if (dir == 'd') {
        if (pos < m - 1) {
          if (map[f][pos + 1] == '.') {
            pos++;
          } else if (map[f][pos + 1] == '+') {
            map[f][pos + 1] = '.';
            dir = 'e';
            turn = 0;
            int new_last = pos;
            if (last != -1) {
              sum += pos - last;
              pos = last;
            }
            last = new_last;
          } else if (map[f][pos + 1] == '#') {
            turn++;
            if (turn == 2) {
              cout << "Never" << endl;
              break;
            }
            dir = 'e';
            int new_last = pos;
            if (last != -1) {
              sum += pos - last;
              pos = last;
            }
            last = new_last;
          }
        } else {
          turn++;
          if (turn == 2) {
            cout << "Never" << endl;
            break;
          }
          dir = 'e';
          int new_last = pos;
          if (last != -1) {
            sum += pos - last;
            pos = last;
          }
          last = new_last;
        }
      } else if (dir == 'e') {
        if (pos > 0) {
          if (map[f][pos - 1] == '.') {
            pos--;
          } else if (map[f][pos - 1] == '+') {
            map[f][pos - 1] = '.';
            dir = 'd';
            turn = 0;
            int new_last = pos;
            if (last != -1) {
              sum += last - pos;
              pos = last;
            }
            last = new_last;
          } else if (map[f][pos - 1] == '#') {
            turn++;
            if (turn == 2) {
              cout << "Never" << endl;
              break;
            }
            dir = 'd';
            int new_last = pos;
            if (last != -1) {
              sum += last - pos;
              pos = last;
            }
            last = new_last;
          }
        } else {
          turn++;
          if (turn == 2) {
            cout << "Never" << endl;
            break;
          }
          dir = 'd';
          int new_last = pos;
          if (last != -1) {
            sum += last - pos;
            pos = last;
          }
          last = new_last;
        }
      }
    }
    sum++;
  }
  if (turn < 2) cout << sum << endl;
  return 0;
}
