#include <bits/stdc++.h>
const int N = 1e5 + 7;
const int mod = 1e9 + 7;
using namespace std;
char str[N];
long long fib[N];
int main() {
  int i, j, k, n, m;
  scanf("%s", str);
  int len = strlen(str);
  int flag = 1;
  long long cnt = 1;
  long long ans = 1;
  fib[0] = 1;
  fib[1] = 1;
  for (i = 2; i < N; i++) fib[i] = (fib[i - 1] + fib[i - 2]) % mod;
  for (i = 0; i < len; i++) {
    if (str[i] == 'm' || str[i] == 'w') {
      flag = 0;
      break;
    }
    if (i > 0 && str[i] == str[i - 1] && (str[i] == 'u' || str[i] == 'n'))
      cnt++;
    else {
      ans = ans * fib[cnt] % mod;
      cnt = 1;
    }
  }
  ans = ans * fib[cnt] % mod;
  if (flag == 0)
    printf("0\n");
  else {
    printf("%lld\n", ans);
  }
}
