#include <bits/stdc++.h>
using namespace std;
long long md = 1e9 + 7;
const int N = 100005;
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long fact[100003] = {1};
long long term(long long n, long long r) {
  long long y = fact[n];
  y = (y * power(fact[r], md - 2, md)) % md;
  y = (y * power(fact[n - r], md - 2, md)) % md;
  return y;
}
long long fun(long long x) {
  long long val = 0;
  for (int i = 0; i <= x / 2; i++) {
    val = (val + term(x - i, i)) % md;
  }
  return val;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int i = 1; i <= 100002; i++) {
    fact[i] = (fact[i - 1] * i) % md;
  }
  string s;
  cin >> s;
  long long u = 0, n = 0;
  long long ans = 1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'u') {
      u++;
    } else {
      if (u != 0) {
        long long val = fun(u);
        ans = (ans * val) % md;
      }
      u = 0;
    }
    if (s[i] == 'n') {
      n++;
    } else {
      if (n != 0) {
        long long val = fun(n);
        ans = (ans * val) % md;
      }
      n = 0;
    }
    if (s[i] == 'w' || s[i] == 'm') {
      cout << "0"
           << "\n";
      return 0;
    }
  }
  if (u != 0) {
    long long val = fun(u);
    ans = (ans * val) % md;
  } else if (n != 0) {
    long long val = fun(n);
    ans = (ans * val) % md;
  }
  cout << ans << "\n";
  return 0;
}
