#include <bits/stdc++.h>
using namespace std;
const int maxn = 100001, mod = 1000000007;
int dpu[maxn], dpn[maxn];
int main(void) {
  string s;
  cin >> s;
  bool flag = false;
  for (int i = 0; i < s.length(); i++)
    if (s[i] == 'w' || s[i] == 'm') {
      flag = true;
      break;
    }
  if (flag) {
    cout << 0 << endl;
    return 0;
  }
  dpu[0] = dpu[1] = 1;
  dpn[0] = dpn[1] = 1;
  for (int i = 2; i <= s.length(); i++) {
    if (s[i - 1] == 'u' && s[i - 2] == 'u') {
      dpu[i] = (dpu[i - 1] + dpu[i - 2]) % mod;
      dpn[i] = dpn[i - 1];
    } else
      dpu[i] = dpu[i - 1];
    if (s[i - 1] == 'n' && s[i - 2] == 'n') {
      dpn[i] = (dpn[i - 1] + dpn[i - 2]) % mod;
      dpu[i] = dpu[i - 1];
    } else
      dpn[i] = dpn[i - 1];
  }
  long long int ans =
      (long long int)dpu[s.length()] * (long long int)dpn[s.length()] % mod;
  cout << ans << endl;
  return 0;
}
