#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int max_n = 101010;
  vector<long long> fib(101010, 0);
  fib[0] = 1;
  fib[1] = 1;
  fib[2] = 2;
  for (int i = 3; i < max_n; i++) {
    fib[i] = fib[i - 1] + fib[i - 2];
    fib[i] %= MOD;
  }
  string s;
  cin >> s;
  int n = s.size();
  long long ans = 1LL;
  char c = 'x';
  int cnt = 0;
  for (int i = (0); i < (n); i++) {
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0 << endl;
      return 0;
    }
    if (s[i] == 'n') {
      if (c == 'n') {
        cnt++;
      } else {
        ans *= fib[cnt];
        ans %= MOD;
        c = 'n';
        cnt = 1;
      }
    } else if (s[i] == 'u') {
      if (c == 'u') {
        cnt++;
      } else {
        ans *= fib[cnt];
        ans %= MOD;
        c = 'u';
        cnt = 1;
      }
    } else {
      ans *= fib[cnt];
      ans %= MOD;
      c = 'x';
      cnt = 0;
    }
  }
  ans *= fib[cnt];
  ans %= MOD;
  cout << ans << endl;
}
