#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long f[100005], ans = 1;
int main() {
  f[1] = 1;
  f[2] = 2;
  for (int i = 3; i < 100005; i++) f[i] = (f[i - 1] + f[i - 2]) % mod;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'u' || s[i] == 'n') {
      int cnt = 1;
      for (i++; i < s.size() && s[i] == s[i - 1]; i++) cnt++;
      i--;
      ans = (ans * f[cnt]) % mod;
    }
  }
  for (int i = 0; i < s.size(); i++)
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0;
      return 0;
    }
  cout << ans;
}
