#include <bits/stdc++.h>
using namespace std;
vector<int> poss;
const long long modulo = 1000000007;
long long fib[100010];
int main() {
  string s;
  cin >> s;
  long long res = 1;
  for (int i = 0; i < s.size(); i++) {
    int x = 0;
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0 << '\n';
      return 0;
    }
    if (s[i] == 'u') {
      while (s[i] == 'u' && i < s.size()) x++, i++;
      i--;
    } else if (s[i] == 'n') {
      while (s[i] == 'n' && i < s.size()) x++, i++;
      i--;
    }
    if (x > 1) poss.push_back(x);
  }
  fib[2] = 2;
  fib[1] = 1;
  for (int i = 3; i <= s.size(); i++) {
    fib[i] = ((long long)fib[i - 1] + fib[i - 2]) % modulo;
  }
  for (int i = 0; i < poss.size(); i++) {
    res = ((long long)res * (long long)fib[poss[i]]) % modulo;
  }
  cout << res << '\n';
  return 0;
}
