#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
inline long long rand(long long x, long long y) {
  return (rng() % (y + 1 - x)) + x;
}
string inline to_string(char c) {
  string second(1, c);
  return second;
}
template <typename T>
inline T gcd(T a, T b) {
  return a == 0 ? b : gcd(b % a, a);
}
string second;
long long int dp[(100006)];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> second;
  for (auto i : second)
    if (i == 'm' || i == 'w') {
      cout << 0;
      return 0;
    }
  dp[0] = 1, dp[1] = 1;
  long long int mod = 1e9 + 7;
  for (long long int i = (2); i <= (long long int)((100006) - 1); ++i) {
    dp[i] = dp[i - 2] + dp[i - 1];
    dp[i] %= mod;
  }
  char p = '*';
  long long int co = 0;
  long long int ans = 1;
  for (auto i : second) {
    if (i == p && (i == 'u' || i == 'n')) {
      ++co;
    } else {
      ans *= dp[co], ans %= mod;
      co = 1;
      p = i;
    }
  }
  ans *= dp[co], ans %= mod;
  cout << ans << '\n';
}
