#include <bits/stdc++.h>
using namespace std;
long long fib[100005];
void fibo() {
  fib[0] = 1;
  fib[1] = 1;
  for (long long i = 2; i < 100005; i++) {
    fib[i] = fib[i - 1] + fib[i - 2];
    fib[i] = fib[i] % 1000000007;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string str;
  cin >> str;
  fibo();
  long long ans, val, val1, len, i = 0, count = 0;
  while (str[i] != '\0') {
    if (str[i] == 'm') {
      count++;
    } else if (str[i] == 'w') {
      count++;
    }
    i++;
  }
  if (count > 0) {
    cout << 0 << "\n";
  } else if (count == 0) {
    long long j;
    i = 0;
    val = 0;
    val1 = 0;
    ans = 1;
    len = str.length();
    while (i < len) {
      j = 0;
      count = 0;
      if (str[i] == 'n' || str[i] == 'u') {
        j = i;
        while (str[j] == str[i]) {
          count++;
          j++;
        }
        i = j;
        val = fib[count];
        ans = ((ans % 1000000007) * (val % 1000000007)) % 1000000007;
      } else {
        i++;
      }
      ans = ans % 1000000007;
    }
    cout << ans << "\n";
  }
}
