#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
char s[100005];
int dp[100005];
int main() {
  while (~scanf("%s", s + 1)) {
    int n = strlen(s + 1);
    dp[0] = 1;
    for (int i = 1; i <= n; ++i) {
      if (s[i] == 'w' || s[i] == 'm')
        dp[i] = 0;
      else if (i == 1 || s[i] != 'u' && s[i] != 'n')
        dp[i] = dp[i - 1];
      else if (s[i] == s[i - 1])
        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
      else
        dp[i] = dp[i - 1];
    }
    printf("%d\n", dp[n]);
  }
}
