#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, mod = 1e9 + 7;
int fbn[N];
char s[N];
void init() {
  fbn[1] = 1, fbn[2] = 2;
  for (int i = 3; i < N; i++) fbn[i] = (1ll * fbn[i - 1] + fbn[i - 2]) % mod;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  init();
  cin >> s + 1;
  int len = strlen(s + 1);
  int ans = 1;
  for (int i = 1; i <= len; i++) {
    int j = i + 1;
    if (s[i] == 'w' || s[i] == 'm') {
      ans = 0;
      break;
    } else if (s[i] == 'n') {
      while (j <= len && s[j] == 'n') j++;
      ans = 1ll * ans * fbn[j - i] % mod;
      i = j - 1;
    } else if (s[i] == 'u') {
      while (j <= len && s[j] == 'u') j++;
      ans = 1ll * ans * fbn[j - i] % mod;
      i = j - 1;
    }
  }
  cout << ans << endl;
  return 0;
}
