#include <bits/stdc++.h>
using namespace std;
int dp[2][200100];
int arr[200100];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string s;
  cin >> s;
  int n = (int)s.size();
  for (int i = 0; i < n; i++) {
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0 << endl;
      return 0;
    }
    arr[i + 1] = s[i];
  }
  long long mod = 1e9 + 7;
  dp[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    if ((arr[i] == 'n' || arr[i] == 'u') && (arr[i] == arr[i - 1])) {
      dp[0][i] = (dp[0][i - 1] + dp[1][i - 1]) % mod;
      dp[1][i] = (dp[0][i - 2] + dp[1][i - 2]) % mod;
    } else {
      dp[0][i] = (dp[0][i - 1] + dp[1][i - 1]) % mod;
    }
  }
  cout << (dp[0][n] + dp[1][n]) % mod << endl;
  return 0;
}
