#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  string s;
  cin >> s;
  long long int n = s.length();
  vector<long long int> dp(n, 0);
  dp[0] = 1;
  for (long long int i = 1; i <= n - 1; i++) {
    if (s[i] == s[i - 1] && (s[i] == 'n' || s[i] == 'u')) {
      if (i == 1)
        dp[i] = 2;
      else
        dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007;
    } else
      dp[i] = dp[i - 1];
  }
  long long int flag = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] == 'm' || s[i] == 'w') flag = 1;
  }
  if (flag == 1)
    cout << 0;
  else
    cout << dp[n - 1];
  return 0;
}
