#include <bits/stdc++.h>
using namespace std;
int Set(int N, int pos) { return N = N | (1 << pos); }
int reset(int N, int pos) { return N = N & ~(1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
inline int addmod(int x, int y) {
  return (x % 1000000007 + y % 1000000007) % 1000000007;
}
inline int submod(int x, int y) {
  return (x % 1000000007 - y % 1000000007 + 1000000007) % 1000000007;
}
inline int mulmod(int x, int y) {
  return (x % 1000000007 * 1LL * y % 1000000007) % 1000000007;
}
inline int nextSubMask(int i, int mask) { return (i - 1) & mask; }
template <typename T>
void we_r_done(T mssg) {
  cout << mssg;
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  string s;
  cin >> s;
  int ans = 0;
  vector<int> dp(s.size() + 4, 0);
  dp[0] = 1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'w' || s[i] == 'm') we_r_done(0);
    if (i) {
      if (s[i] == s[i - 1] && (s[i] == 'u' || s[i] == 'n')) {
        int i2 = 1;
        if (i >= 2) i2 = dp[i - 2];
        dp[i] = addmod(dp[i - 1], i2);
      } else
        dp[i] = dp[i - 1];
    }
  }
  cout << dp[s.size() - 1];
  return 0;
}
