#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  long long int dp[s.size() + 1];
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'w' || s[i] == 'm') {
      cout << 0 << endl;
      return 0;
    }
  }
  dp[0] = 1;
  dp[1] = 1;
  for (int i = 2; i <= s.size(); i++) {
    if (s[i - 1] == s[i - 2] && (s[i - 1] == 'u' || s[i - 2] == 'n')) {
      dp[i] = dp[i - 1] + dp[i - 2];
      dp[i] %= 1000000007;
    } else {
      dp[i] = dp[i - 1];
    }
  }
  cout << dp[s.size()] << endl;
  return 0;
}
