#include <bits/stdc++.h>
using namespace std;
signed main() {
  string s;
  cin >> s;
  vector<long long> lst;
  long long cnt1 = 1, cnt2 = 1;
  if (s[0] == 'w' || s[0] == 'm') {
    cout << 0;
    return 0;
  }
  for (long long i = 1; i < s.size(); i++) {
    if (s[i] == 'w' || s[i] == 'm') {
      cout << 0;
      return 0;
    }
    if (s[i] == s[i - 1] && s[i] == 'u') {
      cnt1++;
      if (cnt2 != 1) {
        lst.push_back(cnt2);
        cnt2 = 1;
      }
    } else if (s[i] == s[i - 1] && s[i] == 'n') {
      cnt2++;
      if (cnt1 != 1) {
        lst.push_back(cnt1);
        cnt1 = 1;
      }
    } else {
      if (cnt2 != 1) {
        lst.push_back(cnt2);
        cnt2 = 1;
      }
      if (cnt1 != 1) {
        lst.push_back(cnt1);
        cnt1 = 1;
      }
    }
  }
  if (cnt2 != 1) {
    lst.push_back(cnt2);
    cnt2 = 1;
  }
  if (cnt1 != 1) {
    lst.push_back(cnt1);
    cnt1 = 1;
  }
  sort(lst.begin(), lst.end());
  long long ans = 1;
  long long a = 1, b = 2, c = 3, i = 0, cur = 3;
  while (i != lst.size()) {
    if (lst[i] == 2) {
      ans *= 2;
      ans %= 1000000007;
      i++;
    } else if (lst[i] == 1)
      i++;
    else {
      while (cur != lst[i]) {
        a = b;
        b = c;
        c = a + b;
        c %= 1000000007;
        cur++;
      }
      ans *= c;
      ans %= 1000000007;
      i++;
    }
  }
  cout << ans;
  return 0;
}
