#include <bits/stdc++.h>
using namespace std::chrono;
using namespace std;
unsigned int M = 1000000007;
long long expo(long long a, long long b, long long mod) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b = b >> 1;
  }
  return res;
}
long long mminvprime(long long a, long long b) { return expo(a, b - 2, b); }
long long mod_add(long long a, long long b, long long m) {
  a = ((a % m) + m) % m;
  b = ((b % m) + m) % m;
  return (((a + b) % m) + m) % m;
}
long long mod_mul(long long a, long long b, long long m) {
  a = ((a % m) + m) % m;
  b = ((b % m) + m) % m;
  return (((a * b) % m) + m) % m;
}
long long mod_sub(long long a, long long b, long long m) {
  a = ((a % m) + m) % m;
  b = ((b % m) + m) % m;
  return (((a - b) % m) + m) % m;
}
long long mod_div(long long a, long long b, long long m) {
  a = ((a % m) + m) % m;
  b = ((b % m) + m) % m;
  return (mod_mul(a, mminvprime(b, m), m) + m) % m;
}
void init() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
}
int main() {
  init();
  string s;
  cin >> s;
  for (auto c : s)
    if (c == 'm' or c == 'w') {
      cout << "0";
      return 0;
    }
  long long i = 1, n = (int)s.size(), ans = 1;
  long long dp[n + 1];
  dp[0] = 1;
  dp[1] = 1;
  for (long long i = 2; i <= n; i++) {
    dp[i] = (dp[i - 1] + dp[i - 2]) % M;
  }
  while (i < n) {
    long long count = 1;
    if (s[i] == 'u')
      while (i < n and s[i] == s[i - 1] and s[i] == 'u') {
        count++;
        i++;
      }
    else if (s[i] == 'n')
      while (i < n and s[i] == s[i - 1] and s[i] == 'n') {
        count++;
        i++;
      }
    if (count > 1) ans = (ans * dp[count]) % M;
    i++;
  }
  cout << ans;
}
