#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7, N = 1e5 + 5;
char s[N];
long long f[N] = {1, 1}, ans = 1, cnt1 = 0, cnt2 = 0;
signed main() {
  scanf("%s", s + 1);
  long long n = strlen(s + 1);
  for (long long i = 2; i <= n; i++) f[i] = (f[i - 1] + f[i - 2]) % mod;
  for (long long i = 1; i <= n + 1; i++) {
    if (s[i] == 'm' || s[i] == 'w') {
      puts("0");
      return 0;
    }
    if (s[i] != 'n') {
      if (cnt1 != 0) (ans *= f[cnt1]) %= mod;
      cnt1 = 0;
    } else
      cnt1++;
    if (s[i] != 'u') {
      if (cnt2 != 0) (ans *= f[cnt2]) %= mod;
      cnt2 = 0;
    } else
      cnt2++;
  }
  cout << ans << endl;
  return 0;
}
