#include <bits/stdc++.h>
using namespace std;
const long long int mx = 100000;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long dp[100005];
  dp[0] = 0;
  dp[1] = 1;
  dp[2] = 2;
  for (int i = 3; i <= 100004; i++) {
    dp[i] = dp[i - 1] + dp[i - 2];
    dp[i] %= 1000000007;
  }
  string s;
  cin >> s;
  vector<long long> u, n;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0 << endl;
      return 0;
    } else if (s[i] == 'n') {
      int j = i + 1;
      while (j < s.size() && s[j] == 'n') j++;
      if ((j - i) != 1) n.push_back(j - i);
      i = j - 1;
    } else if (s[i] == 'u') {
      int j = i + 1;
      while (j < s.size() && s[j] == 'u') {
        j++;
      }
      if ((j - i) != 1) u.push_back(j - i);
      i = j - 1;
    }
  }
  long long ans = 1;
  for (int i = 0; i < u.size(); i++) {
    long long x = u[i];
    ans *= dp[x];
    ans %= 1000000007;
  }
  for (int i = 0; i < n.size(); i++) {
    long long x = n[i];
    ans *= dp[x];
    ans %= 1000000007;
  }
  cout << ans << endl;
}
