#include <bits/stdc++.h>
using namespace std;
long long int dp[100001];
long long int v = 1000000007;
int main() {
  string s;
  cin >> s;
  long long int l = s.length();
  dp[0] = 1;
  dp[1] = 1;
  dp[2] = 2;
  for (int i = 3; i <= l; i++) {
    dp[i] = (dp[i - 1] % v + dp[i - 2] % v) % v;
  }
  bool invalid = false;
  int ans = 1;
  long long int ucount = 0;
  long long int ncount = 0;
  for (int i = 0; i < l; i++) {
    ucount = 0;
    ncount = 0;
    if (s[i] == 'w' || s[i] == 'm') {
      invalid = true;
      break;
    } else {
      if (s[i] == 'u') {
        while (s[i] == 'u') {
          ucount++;
          i++;
        }
        i--;
        ans = ((ans % v) * (dp[ucount] % v)) % v;
      } else if (s[i] == 'n') {
        while (s[i] == 'n') {
          ncount++;
          i++;
        }
        i--;
        ans = ((ans % v) * (dp[ncount] % v)) % v;
      }
    }
  }
  if (invalid == true)
    cout << 0 << endl;
  else
    cout << (ans % v) << endl;
}
