#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int hash[26] = {0};
  for (int i = 0; i < str.length(); i++) {
    hash[str[i] - 'a'] += 1;
  }
  unsigned long long aux[str.length() + 1];
  memset(aux, 0, sizeof(aux));
  int flag = 0;
  if ((hash['m' - 'a'] > 0) || (hash['w' - 'a'] > 0)) {
    flag = 1;
  }
  if (flag) {
    cout << "0\n";
  } else {
    aux[0] = 1;
    aux[1] = 1;
    for (int i = 1; i <= str.length(); i++) {
      if ((str[i] == str[i - 1]) && (str[i] == 'n' || str[i] == 'u')) {
        aux[i + 1] = (aux[i] + aux[i - 1]) % 1000000007;
      } else {
        aux[i + 1] = (aux[i]) % 1000000007;
      }
    }
    cout << aux[str.length()] << "\n";
  }
  return 0;
}
