#include <bits/stdc++.h>
using namespace std;
long long Min(long long a, long long b) { return (a < b) ? a : b; }
long long Max(long long a, long long b) { return (a > b) ? a : b; }
long long gcd(long long m, long long n) {
  if (n == 0) return m;
  return gcd(n, m % n);
}
long long lcm(long long m, long long n) { return m * n / gcd(m, n); }
long long fibo[100004] = {1, 1};
long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int i = 2; i <= 100000; i++) fibo[i] = (fibo[i - 1] + fibo[i - 2]) % mod;
  string s;
  long long n;
  cin >> s;
  n = s.length();
  long long sum = 1, cnt = 0, cur = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'n') {
      if (cur == 1)
        cnt++;
      else {
        sum = (sum * fibo[cnt]) % mod;
        cnt = 1;
        cur = 1;
      }
    } else if (s[i] == 'u') {
      if (cur == 2)
        cnt++;
      else {
        sum = (sum * fibo[cnt]) % mod;
        cnt = 1;
        cur = 2;
      }
    } else if (s[i] == 'm' || s[i] == 'w') {
      cout << "0";
      exit(0);
    } else {
      sum = (sum * fibo[cnt]) % mod;
      cnt = 0;
      cur = 0;
    }
  }
  sum = (sum * fibo[cnt]) % mod;
  cout << sum;
  exit(0);
}
