#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  string str;
  cin >> str;
  long long n = str.length();
  for (auto x : str)
    if (x == 'w' || x == 'm') {
      cout << 0 << endl;
      return 0;
    }
  long long m = 1e9 + 7;
  vector<long long> dp(n + 1);
  dp[0] = 1;
  dp[1] = 1;
  for (long long i = 2; i <= n; i++) {
    dp[i] = dp[i - 1];
    if (str[i - 1] == str[i - 2] && (str[i - 1] == 'u' || str[i - 1] == 'n'))
      dp[i] = (dp[i - 1] + dp[i - 2]) % m;
  }
  cout << dp[n] << endl;
}
