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