#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10, MOD = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(false);
  string s;
  long long dp[N], ans = 1;
  dp[0] = 1;
  dp[1] = 1;
  for (long long i = 2; i < N; i++) {
    dp[i] = dp[i - 1] + dp[i - 2];
    dp[i] %= MOD;
  }
  cin >> s;
  for (long long i = 0; i < (long long)(s.size()); i++)
    if (s[i] == 'm' || s[i] == 'w') ans = 0;
  long long n = (long long)(s.size());
  long long x = 1;
  vector<long long> all;
  for (long long i = 1; i < n; i++) {
    if (s[i] == s[i - 1]) {
      x++;
    } else {
      if ((s[i - 1] == 'n') || (s[i - 1] == 'u')) ans *= dp[x];
      x = 1;
      ans %= MOD;
    }
  }
  if ((s[n - 1] == 'n') || (s[n - 1] == 'u')) ans *= dp[x];
  cout << ans % MOD;
}
