#include <bits/stdc++.h>
using namespace std;
long long gi() {
  char cc = getchar();
  long long cn = 0, flus = 1;
  while (cc < '0' || cc > '9') {
    if (cc == '-') flus = -flus;
    cc = getchar();
  }
  while (cc >= '0' && cc <= '9') cn = cn * 10 + cc - '0', cc = getchar();
  return cn * flus;
}
const long long N = 1e5 + 5;
const long long P = 1e9 + 7;
char s[N];
long long dp[N], n;
long long Get(long long x) { return dp[x] % P; }
signed main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (register long long i = 1; i <= n; ++i)
    if (s[i] == 'm' || s[i] == 'w') {
      puts("0");
      exit(0);
    }
  long long Ans = 1, befu = 0, befw = 0;
  dp[0] = dp[1] = 1;
  for (register long long i = 2; i <= n; ++i)
    dp[i] = (dp[i - 1] + dp[i - 2]) % P;
  for (register long long i = 1; i <= n; ++i) {
    if (s[i] != 'u' && befu) Ans = (Ans * Get(befu)) % P, befu = 0;
    if (s[i] != 'n' && befw) Ans = (Ans * Get(befw)) % P, befw = 0;
    if (s[i] == 'u') ++befu;
    if (s[i] == 'n') ++befw;
  }
  Ans = (Ans * Get(befu)) % P, Ans = (Ans * Get(befw)) % P;
  printf("%I64d\n", Ans);
  return 0;
}
