#include <bits/stdc++.h>
using namespace std;
int main() {
  string p;
  long long int i, j, n, fl2 = 0;
  cin >> p;
  n = p.size();
  for (i = 0; i < n; i++) {
    if (p[i] == 'w' || p[i] == 'm') fl2 = 1;
  }
  if (fl2 == 1)
    cout << 0 << endl;
  else {
    long long int dp[n + 1];
    dp[0] = 1;
    dp[1] = 1;
    for (i = 2; i <= n; i++) {
      if (p[i - 1] == p[i - 2] && (p[i - 1] == 'n' || p[i - 1] == 'u')) {
        dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007;
      } else
        dp[i] = dp[i - 1] % 1000000007;
    }
    cout << dp[n] << endl;
  }
  return 0;
}
