#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long MAX = 1e18;
const long long MIN = -1e18;
long long max(long long a, long long b) {
  if (a < b) return b;
  return a;
}
long long min(long long a, long long b) {
  if (a > b) return b;
  return a;
}
long long mmi(long long a, long long m) {
  long long m0 = m;
  long long y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m;
    long long t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  string s;
  cin >> s;
  long long l = s.size() + 1;
  s += '#';
  long long a[100001];
  a[0] = 1, a[1] = 1;
  for (long long i = 2; i < 100001; i += 1) {
    a[i] = (a[i - 1] + a[i - 2]) % mod;
  }
  long long ans = 1, nn = 1, uu = 1;
  for (long long i = 0; i < l - 1; i += 1) {
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0;
      return 0;
    } else {
      if (s[i] == 'n' && s[i + 1] == 'n')
        nn += 1;
      else if (s[i] == 'n' && s[i + 1] != 'n') {
        ans *= a[nn];
        ans %= mod;
        nn = 1;
      } else if (s[i] == 'u' && s[i + 1] == 'u')
        uu += 1;
      else if (s[i] == 'u' && s[i + 1] != 'u') {
        ans *= a[uu];
        ans %= mod;
        uu = 1;
      }
    }
  }
  if (s[l - 1] == 'm' || s[l - 1] == 'w')
    cout << 0;
  else
    cout << ans;
  return 0;
}
