#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
string s;
long long p[100005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  p[0] = 1, p[1] = 1;
  for (int i = 2; i <= 100000; i++) {
    p[i] = (p[i - 1] + p[i - 2]) % mod;
  }
  cin >> s;
  int n = s.size();
  int i = 0;
  long long res = 1;
  while (i < n) {
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0 << '\n';
      return 0;
    }
    if (s[i] == 'n' || s[i] == 'u') {
      int cnt = 0, j = i;
      while (j < n && s[j] == s[i]) {
        cnt++;
        j++;
      }
      res = (res * p[cnt]) % mod;
      i = j;
    } else
      i++;
  }
  cout << res << '\n';
}
