#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
  string s;
  cin >> s;
  vector<int> dp(s.size() + 1);
  dp[0] = dp[1] = 1;
  for (char c : s) {
    if (c == 'w' || c == 'm') {
      cout << 0;
      return 0;
    }
  }
  for (int i = 2; i <= s.size(); i++) {
    if (s[i - 1] == s[i - 2] && (s[i - 1] == 'u' || s[i - 1] == 'n'))
      dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
    else
      dp[i] = dp[i - 1];
  }
  cout << dp[s.size()];
  return 0;
}
