#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5, mod = 1e9 + 7;
long long dp[N];
string s;
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> s;
  dp[0] = 1;
  if (s.find('m') != -1 || s.find('w') != -1) {
    cout << 0;
    return 0;
  }
  for (long long i = 1; i < s.size(); ++i) {
    if (s[i] == s[i - 1] && (s[i] == 'n' || s[i] == 'u')) {
      dp[i] = (dp[i - 1] + (i >= 2 ? dp[i - 2] : 1)) % mod;
    } else {
      dp[i] = dp[i - 1];
    }
  }
  cout << dp[s.size() - 1];
}
