#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int fun(int n) {
  long long dp[n + 1];
  dp[1] = 1, dp[2] = 2;
  for (int i = 3; i <= n; ++i) dp[i] = dp[i - 1] + dp[i - 2], dp[i] %= mod;
  ;
  return dp[n];
}
int main() {
  string a;
  cin >> a;
  int n = a.length();
  int i = 0;
  long long ans = 1;
  while (i < n) {
    if (a[i] == 'm' || a[i] == 'w') {
      ans = 0;
      break;
    }
    if (a[i] == 'u' || a[i] == 'n') {
      char ch = a[i];
      int j = i;
      while (j < n && a[j] == ch) ++j;
      int temp = j - i;
      ans *= (fun(temp));
      ans %= mod;
      i = j;
    } else
      ++i;
  }
  cout << ans;
}
