#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
const int N = 1e5 + 20, mod = 1e9 + 7;
int n, dp[N];
string s;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> s;
  n = (int)s.size();
  dp[0] = 1;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'm' || s[i] == 'w') return cout << "0\n", 0;
    dp[i + 1] = dp[i];
    if (i && s[i] == s[i - 1] && (s[i] == 'u' || s[i] == 'n'))
      dp[i + 1] = (dp[i] + dp[i - 1]) % mod;
  }
  cout << dp[n] << '\n';
}
