#include <bits/stdc++.h>
long long int const MOD = 1000000007;
long long int const N = 1000005;
long long int const LN = 20;
long long int const inf = 8e18;
using namespace std;
long long int n, m, a[N];
long long int dp[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  string str;
  cin >> str;
  str = " " + str;
  for (auto w : str) {
    if (w == 'm' || w == 'w') {
      cout << 0;
      return 0;
    }
  }
  long long int len = str.size();
  dp[0] = 1;
  for (long long int i = 1; i < len; i++) {
    dp[i] += dp[i - 1];
    if (str[i] == 'u' && str[i - 1] == 'u') {
      dp[i] += dp[i - 2];
    }
    dp[i] %= MOD;
    if (str[i] == 'n' && str[i - 1] == 'n') {
      dp[i] += dp[i - 2];
    }
    dp[i] %= MOD;
  }
  cout << dp[len - 1];
  return 0;
}
