#include <bits/stdc++.h>
using namespace std;
long long a, b, c, a1, b1, c1;
long long vis[201000];
long long x, n, k, d, ans2, y, m;
string s;
long long poww(long long po, long long ba) {
  if (ba == 0) return 1;
  if (ba == 1) return po;
  if (ba % 2 == 0)
    return ((poww(po, ba / 2) % 1000000007) * (poww(po, ba / 2) % 1000000007) %
            1000000007);
  return (((poww(po, ba / 2) % 1000000007) * (poww(po, ba / 2) % 1000000007) %
           1000000007) *
          (po % 1000000007)) %
         1000000007;
}
long long gcd(long long xx, long long yy) {
  if (yy == 0) return xx;
  if (yy > xx) swap(xx, yy);
  return gcd(yy, xx % yy);
}
long long dp[200010];
long long Dp(long long idx) {
  if (idx >= n - 1) return 1;
  if (dp[idx] != -1) return dp[idx] % 1000000007;
  if (s[idx] == 'u' && s[idx + 1] == 'u')
    return dp[idx] = (Dp(idx + 1) % 1000000007 + Dp(idx + 2) % 1000000007) %
                     1000000007;
  if (s[idx] == 'n' && s[idx + 1] == 'n')
    return dp[idx] = (Dp(idx + 1) % 1000000007 + Dp(idx + 2) % 1000000007) %
                     1000000007;
  return dp[x] = Dp(idx + 1) % 1000000007;
}
int main() {
  memset(dp, -1, sizeof(dp));
  cin >> s;
  n = s.size();
  for (int i = 0; i < n; i++)
    if (s[i] == 'm' || s[i] == 'w') {
      cout << 0 << endl;
      return 0;
    }
  cout << Dp(0) << endl;
  return 0;
}
