#include <bits/stdc++.h>
using namespace std;
int m;
int n;
int left_i;
int right_i;
int pos_i;
int row_i;
int direction_is_left;
unsigned long long counter;
vector<string> field;
void init() {
  cin >> n >> m;
  field.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> field[i];
  }
}
int next_i[] = {1, -1};
bool locked[2];
void process_one_row() {
  int lock_counter = 0;
  for (;;) {
    if (direction_is_left) {
      counter += pos_i - left_i;
      pos_i = left_i;
    } else {
      counter += right_i - pos_i;
      pos_i = right_i;
    }
    int next_pos = pos_i + next_i[direction_is_left];
    ++counter;
    if (field[row_i + 1][pos_i] == '.') {
      ++row_i;
      break;
    } else if (next_pos == m || next_pos == -1 ||
               field[row_i][next_pos] == '#') {
      direction_is_left = 1 - direction_is_left;
      locked[direction_is_left] = true;
    } else if (field[row_i][next_pos] == '+') {
      if (direction_is_left) {
        left_i = next_pos;
      } else {
        right_i = next_pos;
      }
      direction_is_left = 1 - direction_is_left;
    } else {
      if (direction_is_left) {
        left_i = next_pos;
      } else {
        right_i = next_pos;
      }
      --counter;
    }
    if (locked[0] && locked[1]) {
      if (lock_counter++ == 2) {
        cout << "Never" << endl;
        exit(0);
      }
    }
  }
  right_i = left_i = pos_i;
  lock_counter = 0;
  locked[0] = locked[1] = false;
}
void solve() {
  while (row_i != n - 1) {
    process_one_row();
  }
  cout << counter << endl;
}
int main() {
  init();
  solve();
}
