#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7, N = 1e5;
int main() {
  int Arr[N + 1];
  Arr[0] = 1;
  Arr[1] = 1;
  Arr[2] = 2;
  for (int i = 3; i < N + 1; i++) {
    Arr[i] = (Arr[i - 1] + Arr[i - 2]) % mod;
  }
  string s;
  cin >> s;
  int n = s.length();
  int p = 0, t = 0;
  long long Ans = 1;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0;
      return 0;
    }
    if (s[i] == 'u')
      p++;
    else {
      Ans = (Ans * Arr[p]) % mod;
      p = 0;
    }
    if (s[i] == 'n') {
      t++;
    } else {
      Ans = (Ans * Arr[t]) % mod;
      t = 0;
    }
  }
  Ans = (Ans * Arr[p]) % mod;
  Ans = (Ans * Arr[t]) % mod;
  cout << Ans;
}
