#include <bits/stdc++.h>
using namespace std;
long long dp[100005];
void solve() {
  string s;
  cin >> s;
  vector<int> u, n;
  int curn = 0, curu = 0;
  for (long long i = 0; i < ((int)s.length()); ++i) {
    if (s[i] == 'n') {
      while (i < (int)s.length() && s[i] == 'n') {
        curn++;
        i++;
      }
      i--;
      if (curn > 1) n.push_back(curn);
      curn = 0;
    }
  }
  for (long long i = 0; i < ((int)s.length()); ++i) {
    if (s[i] == 'u') {
      while (i < (int)s.length() && s[i] == 'u') {
        curu++;
        i++;
      }
      i--;
      if (curu > 1) u.push_back(curu);
      curu = 0;
    }
  }
  for (long long i = 0; i < ((int)s.length()); ++i)
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0;
      return;
    }
  long long pdt1 = 1, pdt2 = 1, pdt = 1;
  for (long long i = 0; i < ((int)u.size()); ++i) {
    pdt1 = ((pdt1 % 1000000007) * (dp[u[i]] % 1000000007)) % 1000000007;
  }
  for (long long i = 0; i < ((int)n.size()); ++i) {
    pdt2 = ((pdt2 % 1000000007) * (dp[n[i]] % 1000000007)) % 1000000007;
  }
  pdt = ((pdt1 % 1000000007) * (pdt2 % 1000000007)) % 1000000007;
  cout << pdt;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  dp[0] = 0;
  dp[1] = 1;
  dp[2] = 2;
  dp[3] = 3;
  for (int i = 4; i <= (100000); ++i)
    dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007;
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
