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