#include <bits/stdc++.h>
using namespace std;
const int Mod = 1e9 + 7;
const int MAXN = 1e5 + 10;
char s[MAXN];
int a[MAXN];
int main() {
  a[1] = 1;
  a[2] = 2;
  for (int i = 3; i < MAXN; i++) {
    a[i] = (a[i - 1] + a[i - 2]) % Mod;
  }
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  vector<int> vc;
  int flag = 1;
  for (int i = 1; i <= n;) {
    if (s[i] == 'n') {
      int cnt = 1;
      while (i + 1 <= n && s[i + 1] == 'n') {
        i++;
        cnt++;
      }
      vc.push_back(cnt);
    } else if (s[i] == 'u') {
      int cnt = 1;
      while (i + 1 <= n && s[i + 1] == 'u') {
        i++;
        cnt++;
      }
      vc.push_back(cnt);
    }
    if (s[i] == 'm' || s[i] == 'w') {
      flag = 0;
      break;
    }
    i++;
  }
  if (flag == 0) {
    puts("0");
  } else {
    int ans = 1;
    for (auto vv : vc) {
      ans = 1ll * ans * a[vv] % Mod;
    }
    printf("%d\n", ans);
  }
}
