#include <bits/stdc++.h>
#pragma GCC optimize("-O3")
const int inf = 1e9;
const long long mod = 1e9 + 7;
using namespace std;
vector<int> vect;
long long POW(int a, int b) {
  int res = 1;
  for (int i = 1; i <= b; i++) {
    res *= a;
  }
  return res;
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  string str;
  int n, q;
  long long dp[100005];
  cin >> str;
  dp[0] = dp[1] = 1;
  str = '#' + str;
  if (str[1] == 'w' || str[1] == 'm') {
    cout << 0 << endl;
    return 0;
  }
  for (int i = 2; i < str.size(); i++) {
    if ((str[i] == 'n' || str[i] == 'u') && str[i] == str[i - 1]) {
      dp[i] = ((dp[i - 1] + dp[i - 2]) % mod);
    } else {
      dp[i] = (dp[i - 1] % mod);
    }
    if (str[i] == 'm' || str[i] == 'w') {
      cout << 0 << endl;
      return 0;
    }
  }
  cout << dp[str.size() - 1] << endl;
  return 0;
}
