#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
string yes = "YES\n";
string no = "NO\n";
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  long long a[200005];
  a[0] = 1;
  a[1] = 1;
  a[2] = 2;
  for (long long i = 3; i < 200005; i++) {
    a[i] = (a[i - 1] + a[i - 2]) % MOD;
  }
  vector<long long> ar;
  long long cntr = 0, n = s.length();
  for (long long i = 0; i < n; i++) {
    if (s[i] == 'm' or s[i] == 'w') {
      cout << 0 << "\n";
      return 0;
    }
    if (s[i] == 'u')
      cntr++;
    else {
      ar.push_back(cntr);
      cntr = 0;
    }
  }
  ar.push_back(cntr);
  cntr = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == 'n')
      cntr++;
    else {
      ar.push_back(cntr);
      cntr = 0;
    }
  }
  ar.push_back(cntr);
  long long ans = 1;
  for (auto itr : ar) {
    ans = (ans * a[itr]) % MOD;
  }
  cout << ans << "\n";
}
