#include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
int dp[100010];
int solve(string s) {
  for (auto x : s) {
    if (x == 'w' || x == 'm') 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 - 1] == 'n'))
      dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
    else
      dp[i] = dp[i - 1] % mod;
  }
  return dp[s.size()];
}
int main() {
  string s;
  cin >> s;
  memset(dp, 0, sizeof(dp));
  cout << solve(s) << endl;
}
