#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[100005];
  cin >> a;
  long long int l = strlen(a), i, s = 1, m = 1000000007, y = 0;
  long long int dp[100005];
  dp[0] = 1;
  dp[1] = 1;
  for (i = 2; i < 100005; ++i) dp[i] = ((dp[i - 1] % m) + (dp[i - 2] % m)) % m;
  for (i = 0; i < l; ++i) {
    if (a[i] == 'm' || a[i] == 'w') y = 1;
    char ch = a[i];
    long long int c = 0;
    if (a[i] == 'n' || a[i] == 'u') {
      while (a[i] == ch) {
        ++i;
        ++c;
        if (i == l) break;
      }
      --i;
    }
    s = ((s % m) * (dp[c] % m)) % m;
  }
  if (y) s = 0;
  cout << s;
  return 0;
}
