#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
const int N = 1e5 + 5;
const long double pi = 3.141592653;
const long long MOD = 1e9 + 7;
const long long mod = 998244353;
const long long INF = 9223372036854775807LL;
using namespace std;
int dx[9] = {1, -1, 0, 0, 1, 1, -1, -1, 0};
int dy[9] = {0, 0, 1, -1, 1, -1, 1, -1, 0};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1;
  while (T--) {
    string s;
    long long i, j, ans = 1, n;
    cin >> s;
    n = (long long)s.size();
    bool ok = true;
    for (i = 0; i < n; i++) {
      if (s[i] == 'w' || s[i] == 'm') ok = false;
    }
    if (!ok)
      ans = 0;
    else {
      long long dp[N];
      dp[0] = 0;
      dp[1] = 1;
      dp[2] = 2;
      for (i = 3; i < N; i++) dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
      for (i = 0; i < n; i++) {
        if (s[i] == 'u' || s[i] == 'n') {
          j = i;
          while (j < n && s[j] == s[i]) j++;
          ans = (ans * dp[j - i]) % MOD;
          i = j - 1;
        }
      }
    }
    cout << ans;
  }
  return 0;
}
