#include <bits/stdc++.h>
using namespace std;
const long long N = 100005;
const long long mod = 1e9 + 7;
long long n, ans = 1, f[N] = {0, 1, 2, 3};
string s;
inline long long read() {
  long long x = 0, y = 1;
  char ch = '\000';
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') y = -1;
  for (; isdigit(ch); ch = getchar()) x = (x << 3) + (x << 1) + (ch ^ '0');
  return x * y;
}
signed main() {
  for (register long long i = 4; i <= N - 5; i++)
    f[i] = (f[i - 1] + f[i - 2]) % mod;
  cin >> s;
  n = s.size();
  bool flag = 0;
  for (register long long i = 0; i < n; i++) {
    if (s[i] == 'm' || s[i] == 'w')
      flag = 1;
    else {
      long long cnt = 1;
      if (s[i] == 'u') {
        while (s[i] == 'u' && s[i + 1] == 'u') {
          i++;
          cnt++;
        }
      } else if (s[i] == 'n') {
        while (s[i] == 'n' && s[i + 1] == 'n') {
          i++;
          cnt++;
        }
      }
      ans = (ans * f[cnt]) % mod;
    }
  }
  if (flag)
    puts("0");
  else
    printf("%lld\n", ans);
  return 0;
}
