#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int pwr(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = (ans * 1LL * a) % mod;
    a = (a * 1LL * a) % mod;
    b >>= 1;
  }
  return ans;
}
const int N = 1e5 + 5;
int fib[N];
int main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  for (char ch : s) {
    if (ch == 'm' || ch == 'w') {
      cout << 0;
      return 0;
    }
  }
  int ans = 1;
  int n = s.size();
  fib[1] = 1;
  fib[2] = 2;
  for (int i = 3; i < N; i++) {
    fib[i] = (fib[i - 1] + fib[i - 2]) % mod;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == 'u' || s[i] == 'n') {
      int pt = i;
      while (pt < n && s[pt] == s[i]) pt++;
      ans = (ans * 1LL * fib[pt - i]) % mod;
      i = pt - 1;
    }
  }
  cout << ans;
  return 0;
}
