#include <bits/stdc++.h>
using namespace std;
const int N = 105, M = 1e4 + 5;
int n, m;
char c[N][M];
long long ans;
void readInput() {
  cin >> n >> m;
  for (int i = n - 1; i >= 0; i--)
    for (int j = 0; j < m; j++) cin >> c[i][j];
}
void solve() {
  int f = n - 1, pos = 0;
  bool ch = true;
  while (f > 0) {
    vector<long long> vc, va;
    long long x = m, y = -1, rip, ep;
    bool p = false, q = false;
    for (int i = pos; i < m; i++) {
      if (c[f][i] == '+')
        vc.push_back(i);
      else if (c[f][i] == '#') {
        x = i;
        break;
      }
      if (c[f - 1][i] == '.') {
        q = true;
        rip = i;
        break;
      }
    }
    for (int i = pos; i >= 0; i--) {
      if (c[f][i] == '+')
        va.push_back(i);
      else if (c[f][i] == '#') {
        y = i;
        break;
      }
      if (c[f - 1][i] == '.') {
        p = true;
        ep = i;
        break;
      }
    }
    if (!p && !q) {
      cout << "Never" << endl;
      return;
    }
    if (ch) {
      if (q && !p) {
        for (int i = 0; i < vc.size(); i++) {
          if (va.size() > i)
            ans += (vc[i] - va[i]) * 2 - 2;
          else
            ans += (vc[i] - y) * 2 - 2;
        }
        ans += rip - pos;
        pos = rip;
      } else if (q && p) {
        if (vc.size() <= va.size()) {
          for (int i = 0; i < vc.size(); i++) ans += (vc[i] - va[i]) * 2 - 2;
          ans += rip - pos;
          pos = rip;
        } else {
          ans += (vc[0] - pos) * 2 - 1;
          for (int i = 0; i < va.size(); i++)
            ans += (vc[i + 1] - va[i]) * 2 - 2;
          ans += pos - ep;
          ch = false;
          pos = ep;
        }
      } else if (!q && p) {
        if (vc.size())
          ans += (vc[0] - pos) * 2 - 1;
        else
          ans += (x - pos) * 2 - 1;
        for (int i = 0; i < va.size(); i++) {
          if (vc.size() > i + 1)
            ans += (vc[i + 1] - va[i]) * 2 - 2;
          else
            ans += (x - va[i]) * 2 - 2;
        }
        ans += pos - ep;
        ch = false;
        pos = ep;
      }
    } else {
      if (q && !p) {
        if (va.size())
          ans += (pos - va[0]) * 2 - 1;
        else
          ans += (pos - y) * 2 - 1;
        for (int i = 0; i < vc.size(); i++) {
          if (va.size() > i + 1)
            ans += (vc[i] - va[i + 1]) * 2 - 2;
          else
            ans += (vc[i] - y) * 2 - 2;
        }
        ans += rip - pos;
        ch = true;
        pos = rip;
      } else if (q && p) {
        if (va.size() <= vc.size()) {
          for (int i = 0; i < va.size(); i++) ans += (vc[i] - va[i]) * 2 - 2;
          ans += pos - ep;
          pos = ep;
        } else {
          ans += (pos - va[0]) * 2 - 1;
          for (int i = 0; i < vc.size(); i++)
            ans += (vc[i] - va[i + 1]) * 2 - 2;
          ans += rip - pos;
          ch = true;
          pos = rip;
        }
      } else if (!q && p) {
        for (int i = 0; i < va.size(); i++) {
          if (vc.size() > i)
            ans += (vc[i] - va[i]) * 2 - 2;
          else
            ans += (x - va[i]) * 2 - 2;
        }
        ans += pos - ep;
        pos = ep;
      }
    }
    ans += 1;
    f--;
  }
  cout << ans << endl;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  readInput(), solve();
  return 0;
}
