#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  bool flag = 1;
  for (auto x : s)
    if (x == 'm' || x == 'w') {
      flag = 0;
      break;
    }
  if (!flag) {
    cout << 0;
    return 0;
  }
  long long dp[n + 1];
  dp[0] = dp[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (s[i - 1] == s[i - 2] && (s[i - 1] == 'n' || s[i - 1] == 'u')) {
      dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
    } else
      dp[i] = dp[i - 1];
  }
  cout << dp[n];
  return 0;
}
