#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int main() {
  string s;
  cin >> s;
  for (char x : s)
    if (x == 'm' || x == 'w') {
      printf("0");
      return 0;
    }
  int n = s.size();
  vector<int> dp(n + 1);
  dp[0] = 1;
  dp[1] = 1;
  for (int i = 2; i <= n; i++) {
    dp[i] = dp[i - 1];
    if (s[i - 1] == s[i - 2] && (s[i - 1] == 'u' || s[i - 1] == 'n')) {
      dp[i] = (dp[i] + dp[i - 2]) % MOD;
    }
  }
  cout << dp[n];
}
