#include <bits/stdc++.h>
using namespace std;
int n;
string s;
long long memo[200010];
long long solve(int cur) {
  if (cur >= n) return 1LL;
  if (memo[cur] == -1LL) {
    long long ans = solve(cur + 1);
    if (cur < n - 1 && ((s[cur] == 'u' && s[cur + 1] == 'u') ||
                        (s[cur] == 'n' && s[cur + 1] == 'n'))) {
      ans = (ans + solve(cur + 2)) % 1000000007LL;
    }
    memo[cur] = ans;
  }
  return memo[cur];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  while (cin >> s) {
    n = (int)s.size();
    bool can = true;
    for (int i = 0; i < n; ++i) {
      if (s[i] == 'm' || s[i] == 'w') {
        can = false;
        break;
      }
    }
    fill(memo, memo + n + 1, -1LL);
    if (!can)
      printf("0\n");
    else
      printf("%lld\n", solve(0));
  }
  return 0;
}
