#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long maxn = 1e5 + 1;
vector<long long> F(maxn);
void precalc() {
  F[0] = F[1] = 1;
  for (long long i = 2; i < maxn; i++) {
    F[i] = F[i - 1] + F[i - 2];
    F[i] %= mod;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  precalc();
  string s;
  cin >> s;
  for (auto i : s) {
    if (i == 'm' || i == 'w') {
      cout << 0;
      return 0;
    }
  }
  long long n = s.size();
  long long res = 1;
  char ch = '*';
  long long cnt = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == ch && (ch == 'n' || ch == 'u')) {
      cnt++;
    } else {
      res *= F[cnt];
      res %= mod;
      cnt = 1;
    }
    ch = s[i];
  }
  if (ch == 'n' || ch == 'u') {
    res *= F[cnt];
    res %= mod;
  }
  cout << res;
}
