#include <bits/stdc++.h>
using namespace std;
long long int sum() { return 0; }
template <typename T, typename... Args>
T sum(T a, Args... args) {
  return a + sum(args...);
}
long long int fib[100005];
void fibb(long long int n) {
  fib[0] = 0;
  fib[1] = 1;
  fib[2] = 2;
  for (long long int i = 3; i <= n; i++) {
    fib[i] = fib[i - 1] % (long long int)(1e9 + 7) +
             fib[i - 2] % (long long int)(1e9 + 7);
    fib[i] %= (long long int)(1e9 + 7);
  }
}
void solve() {
  string s;
  cin >> s;
  fibb((long long int)s.length());
  vector<long long int> v;
  long long int c = 0;
  for (long long int i = 0; i < (long long int)s.length(); i++) {
    c = 0;
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0;
      return;
    }
    if (s[i] == 'n') {
      while (s[i] == 'n') {
        c++;
        i++;
      }
      v.push_back(c);
      c = 0;
      i--;
    }
    if (s[i] == 'u') {
      while (s[i] == 'u') {
        c++;
        i++;
      }
      v.push_back(c);
      c = 0;
      i--;
    }
  }
  long long int ans = 1;
  for (auto i : v) {
    ans *= fib[i];
    ans %= (long long int)(1e9 + 7);
  }
  cout << ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
}
