#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  long long res = 1;
  x = x % 1000000007;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string s;
  cin >> s;
  long long n = s.size();
  map<long long, long long> mu, mn;
  for (long long i = 0; i < n; i++) {
    if (s[i] == 'u') {
      long long j = i;
      while (s[j] == 'u') {
        j++;
        if (j == n) break;
      }
      mu[j - i]++;
      i = j - 1;
    } else if (s[i] == 'n') {
      long long j = i;
      while (s[j] == 'n') {
        j++;
        if (j == n) break;
      }
      mn[j - i]++;
      i = j - 1;
    } else if (s[i] == 'm' || s[i] == 'w') {
      cout << 0;
      return 0;
    }
  }
  long long ar[n + 1];
  ar[1] = 1;
  ar[2] = 2;
  for (long long i = 3; i <= n; i++)
    ar[i] = (ar[i - 1] + ar[i - 2]) % 1000000007;
  map<long long, long long>::iterator itr = mu.begin();
  unsigned long long ans = 1;
  for (; itr != mu.end(); itr++) {
    ans = (ans * power(ar[itr->first], itr->second)) % 1000000007;
  }
  for (itr = mn.begin(); itr != mn.end(); itr++) {
    ans = (ans * power(ar[itr->first], itr->second)) % 1000000007;
  }
  cout << ans;
  return 0;
}
