#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, N = 1e5 + 10;
char s[N];
int dp[N];
int main() {
  scanf("%s", s);
  dp[0] = dp[1] = 1;
  int len = strlen(s);
  if (s[0] == 'w' || s[0] == 'm') {
    puts("0");
    return 0;
  }
  for (int i = 2; i <= len; i++) {
    if (s[i - 1] == 'w' || s[i - 1] == 'm') {
      puts("0");
      return 0;
    }
    if ((s[i - 1] == 'u' || s[i - 1] == 'n') && (s[i - 1] == s[i - 2]))
      dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
    else
      dp[i] = dp[i - 1];
  }
  printf("%d", dp[len]);
}
