#include <bits/stdc++.h>
using namespace std;
long long fib[100010];
long long add(long long a, long long b) {
  return ((a % 1000000007) + (b % 1000000007)) % 1000000007;
}
long long mul(long long a, long long b) {
  return ((a % 1000000007) * (b % 1000000007)) % 1000000007;
}
int main() {
  ios_base::sync_with_stdio(false);
  fib[1] = 1;
  fib[2] = 2;
  for (int i = 3; i <= 100000; i++) fib[i] = add(fib[i - 1], fib[i - 2]);
  string s;
  cin >> s;
  bool can = true;
  for (char c : s) {
    if (c == 'm' || c == 'w') can = false;
  }
  if (!can) {
    cout << 0 << endl;
    return 0;
  }
  long long ans = 1;
  long long cnt = s[0] == 'u' || s[0] == 'n';
  for (int i = 1; i < s.size(); i++) {
    if (s[i] != s[i - 1] && cnt > 0) {
      ans = mul(ans, fib[cnt]);
      cnt = s[i] == 'u' || s[i] == 'n';
    } else {
      if (s[i] == 'u' || s[i] == 'n') cnt++;
    }
  }
  if (cnt > 0) ans = mul(ans, fib[cnt]);
  cout << ans % 1000000007 << endl;
}
