#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e9 + 7;
vector<bool> prime(10000005, true);
void sieveOfEratosthenes() {
  for (int i = 2; i <= sqrt(10000005); ++i) {
    if (prime[i]) {
      for (int j = i * i; j <= 10000005; j += i) {
        prime[j] = false;
      }
    }
  }
}
bool isPrime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  long long int p = sqrt(n);
  for (int i = 5; i <= p; i += 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long int countFactors(long long int num) {
  long long int cnt = 0;
  for (int i = 1; i <= sqrt(num); i++) {
    if (num % i == 0) {
      if (num / i == i)
        cnt++;
      else
        cnt = cnt + 2;
    }
  }
  return cnt;
}
int main() {
  string s;
  cin >> s;
  int n;
  n = s.length();
  long long int tt[n + 1];
  tt[0] = 1;
  tt[1] = 1;
  bool flag = true;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'w' || s[i] == 'm') {
      flag = false;
      break;
    }
  }
  if (!flag)
    cout << "0" << endl;
  else {
    for (int i = 2; i < n + 1; i++) {
      tt[i] = tt[i - 1];
      if ((s[i - 1] == 'u' && s[i - 2] == 'u') ||
          (s[i - 1] == 'n' && s[i - 2] == 'n')) {
        tt[i] = (tt[i] + tt[i - 2]) % MOD;
      }
    }
    cout << tt[n] << endl;
  }
  return 0;
}
