#include <bits/stdc++.h>
using namespace std;
char s[100005];
int aa[100005];
int main() {
  long long ans = 1;
  int a = 1;
  aa[1] = 1;
  aa[2] = 2;
  for (int i = 3; i <= 100000; i++)
    aa[i] = (aa[i - 1] + aa[i - 2]) % 1000000007;
  scanf("%s", s);
  int l = strlen(s);
  s[l++] = '#';
  for (int i = 0; i < l; i++) {
    if (s[i] == 'w' || s[i] == 'm') {
      ans = 0;
      break;
    } else if (s[i] == 'u' || s[i] == 'n') {
      if (i > 0) {
        if (s[i] == s[i - 1])
          a++;
        else {
          ans = (ans * aa[a]) % 1000000007;
          a = 1;
        }
      } else
        a = 1;
    } else {
      ans = (ans * aa[a]) % 1000000007;
      a = 1;
    }
  }
  cout << ans;
  return 0;
}
