#include <bits/stdc++.h>
#pragma GCC optimize("O2")
const int NMAX = 5e5 + 5, mod = 1e9 + 7;
using namespace std;
long long dp[NMAX];
int main() {
  string s;
  cin >> s;
  int N = s.length();
  long long ans = 1;
  dp[1] = 1;
  dp[2] = 2;
  for (int i = 3; i <= N; i++) dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
  if (s[0] == 'w' || s[0] == 'm')
    ans = 0;
  else
    for (int i = 1; i < N; i++) {
      int cc = 1;
      if (s[i] == 'w' || s[i] == 'm') {
        cout << "0\n";
        return 0;
      }
      if (s[i] != 'n' && s[i] != 'u') continue;
      while (i < N && s[i] == s[i - 1]) i++, cc++;
      long long u = dp[cc];
      ans = (ans * u) % mod;
    }
  cout << ans << "\n";
}
