#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1e5 + 5;
const long long modu = 1e9 + 7;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long dp[100001];
  dp[0] = dp[1] = 0;
  dp[2] = 2;
  dp[3] = 3;
  for (long long i = 4; i < 100001; i++) dp[i] = (dp[i - 1] + dp[i - 2]) % modu;
  string s;
  cin >> s;
  long long l = s.size();
  vector<long long> v;
  long long x = 0;
  long long m = 0;
  bool res = false;
  for (long long i = 0; i < l; i++) {
    if (s[i] == 'm' || s[i] == 'w') res = true;
    if (s[i] == 'u') {
      x++;
    } else {
      if (x > 1) v.push_back(x);
      x = 0;
    }
    if (s[i] == 'n') {
      m++;
    } else {
      if (m > 1) v.push_back(m);
      m = 0;
    }
  }
  if (m > 1) v.push_back(m);
  if (x > 1) v.push_back(x);
  if (res) {
    cout << 0;
    return 0;
  }
  long long ans = 1;
  for (auto d : v) {
    ans = ((ans % modu) * (dp[d] % modu)) % modu;
  }
  cout << ans << "\n";
}
