#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long MAXN = 1e5 + 228;
long long Sum(long long a, long long b) {
  long long c = a + b;
  if (c >= MOD) {
    c -= MOD;
  }
  return c;
}
void Add(long long& a, long long b) {
  a += b;
  if (a >= MOD) {
    a -= MOD;
  }
}
void Sub(long long& x, long long y) {
  if (y == 0) return;
  Add(x, MOD - y);
}
void Mul(long long& x, long long y) { x = (x * y) % MOD; }
void solve() {
  string s;
  cin >> s;
  long long ans = 1;
  s += '@';
  long long n = s.size();
  for (int i = 0; i < n - 1; ++i) {
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0 << '\n';
      return;
    }
    if (s[i] != 'n' && s[i] != 'u') {
      s[i] = '@';
    } else {
      s[i] = (s[i] == 'n' ? '1' : '0');
    }
  }
  long long cur = 0;
  vector<long long> dp(n, 0);
  dp[0] = 1;
  for (int i = 1; i < n; ++i) {
    Add(dp[i], Sum(dp[i - 1], (i - 2 >= 0 ? dp[i - 2] : 0)));
  }
  for (int i = 0; i < n; ++i) {
    if (s[i] == '@') {
      Mul(ans, dp[cur]);
      cur = 0;
    } else {
      if (s[i] == '1') {
        if (i == 0 || s[i - 1] == '0') {
          Mul(ans, dp[cur]);
          cur = 1;
        } else {
          cur++;
        }
        continue;
      }
      if (s[i] == '0') {
        if (i == 0 || s[i - 1] == '1') {
          Mul(ans, dp[cur]);
          cur = 1;
        } else {
          cur++;
        }
        continue;
      }
    }
  }
  cout << ans << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  long long test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
