#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
long long dp[100001];
void icchhipadey() {
  string s;
  cin >> s;
  long long n = s.size();
  for (int i = 0; i < n; i++) {
    if (s[i] == 'w' || s[i] == 'm') {
      cout << "0";
      return;
    }
  }
  dp[0] = 1;
  dp[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (s[i - 1] != 'u' && s[i - 1] != 'n') {
      dp[i] = dp[i - 1] % MOD;
    } else {
      if (s[i - 1] == s[i - 2])
        dp[i] = (dp[i - 1] % MOD + dp[i - 2] % MOD) % MOD;
      else {
        dp[i] = dp[i - 1] % MOD;
      }
    }
  }
  cout << dp[n] << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  t = 1;
  while (t--) icchhipadey();
}
