#include <bits/stdc++.h>
using namespace std;
const signed long long INF = 1000000100;
const long double EPS = 1e-9;
void read_data() {}
void solve() {}
signed long long MOD = 1000000007;
const int MAXN = 1000100;
signed long long F[MAXN];
int main() {
  F[0] = 1;
  F[1] = 1;
  F[2] = 2;
  for (int i = 3; (i) < (MAXN); (i)++) F[i] = (F[i - 1] + F[i - 2]) % MOD;
  string s;
  cin >> s;
  s += "%";
  int streak = 0;
  char last_char = '#';
  signed long long r = 1;
  for (char c : s) {
    if (c == 'm' or c == 'w') {
      r = 0;
      break;
    }
    if (c == 'n' or c == 'u') {
      if (c == last_char) {
        streak++;
      } else {
        r *= F[streak];
        r %= MOD;
        streak = 1;
      }
    } else {
      r *= F[streak];
      r %= MOD;
      streak = 1;
    }
    last_char = c;
  }
  cout << r << endl;
}
