#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7, N = 200005;
signed main() {
  long long t1 = 1;
  while (t1--) {
    long long dp[N];
    dp[0] = 1;
    dp[1] = 1;
    dp[2] = 2;
    for (long long i = 3; i < N; i++) dp[i] = (dp[i - 1] + dp[i - 2]) % M;
    long long ans = 1;
    string s;
    cin >> s;
    long long n = s.size();
    for (long long i = 0; i < n;) {
      if (s[i] == 'm' || s[i] == 'w') {
        ans = 0;
        break;
      }
      if (s[i] != 'n' && s[i] != 'u') {
        i++;
        continue;
      }
      long long cur = 1;
      while (cur + i < n && s[cur + i] == s[i]) cur++;
      ans = (ans * dp[cur]) % M;
      i += cur;
    }
    cout << ans << endl;
  }
}
