#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 9;
const long long MOD = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  for (auto ix : s) {
    if (ix == 'm' || ix == 'w') {
      cout << 0;
      return 0;
    }
  }
  long long last = 0;
  char c = s[0];
  long long n = s.size();
  long long ans = 1;
  vector<long long> pos;
  vector<long long> dp(n + 1, 0);
  dp[1] = 1, dp[2] = 2;
  for (long long i = (long long)(3); i < (long long)(n + 1); ++i)
    dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
  for (long long i = (long long)(1); i < (long long)(n); ++i) {
    if (c != 'u' && c != 'n') {
      if (s[i] == 'u' || s[i] == 'n') c = s[i], last = i;
    } else if (s[i] != c) {
      pos.push_back(dp[i - last]);
      c = s[i], last = i;
    }
  }
  if (c == 'u' || c == 'n') pos.push_back(dp[n - last]);
  for (long long i = (long long)(0); i < (long long)(pos.size()); ++i)
    ans = (ans * pos[i]) % MOD;
  cout << ans;
  return 0;
}
