#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 5;
long long ans = 1, len, f[maxn], now = 0, check = 0;
char c[maxn];
int main() {
  cin >> c;
  len = strlen(c);
  f[0] = 1;
  f[1] = 1;
  f[2] = 2;
  for (int i = 3; i <= maxn - 5; i++) f[i] = (f[i - 1] + f[i - 2]) % mod;
  for (int i = 0; i <= len - 1; i++) {
    if (c[i] == 'm' || c[i] == 'w') {
      puts("0");
      return 0;
    }
    if (c[i] == 'u') {
      if (check == 2)
        ans = (ans * f[now]) % mod, now = 1, check = 1;
      else if (check == 1)
        now++;
      else
        check = 1, now = 1;
    } else if (c[i] == 'n') {
      if (check == 1)
        ans = (ans * f[now]) % mod, now = 1, check = 2;
      else if (check == 2)
        now++;
      else
        check = 2, now = 1;
    } else {
      if (check) ans = (ans * f[now]) % mod;
      check = 0, now = 0;
    }
  }
  ans = (ans * f[now]) % mod;
  printf("%lld", ans);
  return 0;
}
