#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6 + 2;
long long int i, j, k, l, m, r, n;
long long int fib[MAX];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  fib[0] = fib[1] = 1;
  for (int i = 2; i < MAX; i++) fib[i] = (fib[i - 1] + fib[i - 2]) % 1000000007;
  string s;
  cin >> s;
  n = s.size();
  if (s.find('m') != -1 || s.find('w') != -1) return cout << "0\n", 0;
  int ans = 1;
  for (int i = 0, j = 0; i < n; i = j) {
    while (j < n && s[j] == s[i]) j++;
    if (s[i] == 'n' || s[i] == 'u')
      ans = (long long int)ans * fib[j - i] % 1000000007;
  }
  cout << ans << '\n';
  return 0;
}
