#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  if (count(s.begin(), s.end(), 'm') || count(s.begin(), s.end(), 'w')) {
    cout << 0;
    return 0;
  }
  int dp[s.length() + 1];
  dp[0] = 1;
  dp[1] = 1;
  for (int i = 2; i <= s.length(); i++) {
    if (s[i - 1] == 'u' && s[i - 2] == 'u' ||
        s[i - 1] == 'n' && s[i - 2] == 'n') {
      dp[i] = dp[i - 1] + dp[i - 2];
    } else {
      dp[i] = dp[i - 1];
    }
    dp[i] %= 1000000007;
  }
  cout << dp[s.length()];
}
