#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T read() {
  T x = 0, f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -f;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 3) + (x << 1) + (c - 48);
    c = getchar();
  }
  return x * f;
}
const int inf = 1e9 + 1e7;
const int MAXN = 1e5 + 1e1;
const long long int Mod = 1e9 + 7;
string s;
long long int f[MAXN];
int main(void) {
  cin >> s;
  bool flag = false;
  int n = s.length();
  f[0] = f[1] = 1;
  for (int i = 2; i <= n; i++) f[i] = (f[i - 1] + f[i - 2]) % Mod;
  for (int i = 0; i < n; i++)
    if (s[i] == 'w' || s[i] == 'm') {
      puts("0");
      flag = true;
      break;
    }
  if (!flag) {
    long long int res = 1;
    int cnt = 1;
    char last = s[0];
    for (int i = 1; i < n; i++) {
      if (s[i] == s[i - 1])
        ++cnt;
      else {
        if (last == 'u' || last == 'n') (res *= f[cnt]) %= Mod;
        last = s[i];
        cnt = 1;
      }
    }
    if (last == 'u' || last == 'n') (res *= f[cnt]) %= Mod;
    printf("%lld\n", res);
  }
  return 0;
}
