#include <bits/stdc++.h>
using namespace std;
int n, m, a[105][10005], d = 2, p = 1, i, j, l[10005], r[10005];
long long t;
char c;
int fl(int x) {
  if (a[j + 1][x] == 0 || a[j][x - 1]) {
    l[x] = x;
    return x;
  }
  if (l[x] == x) l[x]--;
  l[x] = fl(l[x]);
  return l[x];
}
int fr(int x) {
  if (a[j + 1][x] == 0 || a[j][x + 1]) {
    r[x] = x;
    return x;
  }
  if (r[x] == x) r[x]++;
  r[x] = fr(r[x]);
  return r[x];
}
int main() {
  cin >> n >> m;
  for (j = 1; j <= n; j++) {
    a[j][0] = a[j][m + 1] = 2;
    for (i = 1; i <= m; i++)
      cin >> c, a[j][i] = (c == '.' ? 0 : (c == '+' ? 1 : 2));
  }
  for (j = 1; j < n; j++) {
    for (i = 1; i <= m; i++)
      l[i] = i - (a[j][i - 1] == 0), r[i] = i + (a[j][i + 1] == 0);
    while (a[j + 1][p]) {
      if (d == 1 && a[j][p - 1] == 1)
        a[j][p - 1] = 0, t++, d = 2;
      else if (d == 2 && a[j][p + 1] == 1)
        a[j][p + 1] = 0, t++, d = 1;
      else if (d == 1 && a[j][p - 1] == 2)
        t++, d = 2;
      else if (d == 2 && a[j][p + 1] == 2)
        t++, d = 1;
      if (d == 1)
        t += p - fl(p), p = fl(p);
      else if (d == 2)
        t += fr(p) - p, p = fr(p);
      if (a[j][fl(p) - 1] == 2 && a[j][fr(p) + 1] == 2 && a[j + 1][fl(p)] &&
          a[j + 1][fr(p)]) {
        cout << "Never";
        return 0;
      }
    }
    t++;
  }
  cout << t;
  return 0;
}
