#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 10, mod = 1e9 + 7;
long long cache[N], n;
string str;
long long dp(long long i) {
  if (i == n) {
    return 1;
  }
  long long &ans = cache[i];
  if (ans != -1) {
    return ans;
  }
  ans = dp(i + 1) % mod;
  if (i < n - 1 && str[i] == str[i + 1] && (str[i] == 'u' || str[i] == 'n')) {
    ans = (ans + dp(i + 2)) % mod;
  }
  return ans;
}
signed main() {
  cin >> str;
  n = str.size();
  for (char &ch : str) {
    if (ch == 'm' || ch == 'w') {
      cout << 0;
      return 0;
    }
  }
  memset(cache, -1, sizeof(cache));
  cout << dp(0);
  return 0;
}
