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