Constanze is the smartest girl in her village but she has bad eyesight.

One day, she was able to invent an incredible machine! When you pronounce letters, the machine will inscribe them onto a piece of paper. For example, if you pronounce 'c', 'o', 'd', and 'e' in that order, then the machine will inscribe "code" onto the paper. Thanks to this machine, she can finally write messages without using her glasses.

However, her dumb friend Akko decided to play a prank on her. Akko tinkered with the machine so that if you pronounce 'w', it will inscribe "uu" instead of "w", and if you pronounce 'm', it will inscribe "nn" instead of "m"! Since Constanze had bad eyesight, she was not able to realize what Akko did.

The rest of the letters behave the same as before: if you pronounce any letter besides 'w' and 'm', the machine will just inscribe it onto a piece of paper.

The next day, I received a letter in my mailbox. I can't understand it so I think it's either just some gibberish from Akko, or Constanze made it using her machine. But since I know what Akko did, I can just list down all possible strings that Constanze's machine would have turned into the message I got and see if anything makes sense.

But I need to know how much paper I will need, and that's why I'm asking you for help. Tell me the number of strings that Constanze's machine would've turned into the message I got.

But since this number can be quite large, tell me instead its remainder when divided by $10^9+7$.

If there are no strings that Constanze's machine would've turned into the message I got, then print $0$.


-----Input-----

Input consists of a single line containing a string $s$ ($1 \leq |s| \leq 10^5$) — the received message. $s$ contains only lowercase Latin letters.


-----Output-----

Print a single integer — the number of strings that Constanze's machine would've turned into the message $s$, modulo $10^9+7$.


-----Examples-----
Input
ouuokarinn

Output
4

Input
banana

Output
1

Input
nnn

Output
3

Input
amanda

Output
0



-----Note-----

For the first example, the candidate strings are the following: "ouuokarinn", "ouuokarim", "owokarim", and "owokarinn".

For the second example, there is only one: "banana".

For the third example, the candidate strings are the following: "nm", "mn" and "nnn".

For the last example, there are no candidate strings that the machine can turn into "amanda", since the machine won't inscribe 'm'.

Difficulty: MEDIUM

Solutions:
mot = ' ' + input() + ' '
n = len(mot)
dp = [0] * n
dp[0] = 1
if n == 1:
	print(1)
else:
	if mot[0] == mot[1] and (mot[0] == 'n' or mot[0] == 'u'):
		dp[1] = 2
	else:
		dp[1] = 1
	for x in range(2, n):
		if mot[x] == 'u':
			if mot[x - 1] == 'u':
				dp[x] = (dp[x - 1] + dp[x - 2]) % 1000000007
			else:
				dp[x] = dp[x - 1]
		elif mot[x] == 'n':
			if mot[x - 1] == 'n':
				dp[x] = (dp[x - 1] + dp[x - 2]) % 1000000007
			else:
				dp[x] = dp[x - 1]
		else:
			dp[x] = dp[x - 1]
if mot.count('w') > 0 or mot.count('m') > 0:
	print(0)
else:
	print(dp[n - 1])


a = input()
n = len(a)
dp = [1, 1]
if 'm' in a or 'w' in a:
	print(0)
else:
	for x in range(1, n):
		if a[x] == 'u' and a[x - 1] == 'u' or (a[x] == 'n' and a[x - 1] == 'n'):
			dp.append((dp[x] + dp[x - 1]) % (10 ** 9 + 7))
		else:
			dp.append(dp[x] % (10 ** 9 + 7))
	print(dp[n])


import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
S = input()[:-1] + 'l'
if 'w' in S or 'm' in S:
	print(0)
	exit()
MOD = 10 ** 9 + 7
prev = ''
dp = [0] * (len(S) + 1)
dp[0] = 1
dp[1] = 1
for (i, cur, prev) in zip(range(2, len(S) + 2), S, S[1:]):
	dp[i] = dp[i - 1]
	if cur == prev and (cur == 'u' or cur == 'n'):
		dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
print(dp[-1])


MOD = 1000000007
fib = [1, 2]
for i in range(1 + int(100000.0)):
	fib.append((fib[-1] + fib[-2]) % MOD)
s = input()
n = len(s)
if 'm' in s or 'w' in s:
	print(0)
else:
	i = 0
	ans = 1
	while i < n:
		j = i + 1
		if s[i] == 'n':
			while j < n and s[j] == 'n':
				j += 1
			ans = ans * fib[j - i - 1] % MOD
		elif s[i] == 'u':
			while j < n and s[j] == 'u':
				j += 1
			ans = ans * fib[j - i - 1] % MOD
		i = j
	print(ans)


string = input('')
if 'm' in string or 'w' in string:
	print(0)
	exit()
dp = [1, 1]
for i in range(1, len(string)):
	if string[i] == 'n' and string[i - 1] == 'n':
		dp.append((dp[-1] + dp[-2]) % (10 ** 9 + 7))
	elif string[i] == 'u' and string[i - 1] == 'u':
		dp.append((dp[-1] + dp[-2]) % (10 ** 9 + 7))
	else:
		dp.append(dp[-1] % (10 ** 9 + 7))
print(dp[-1])


def main():
	import sys
	s = list(input())
	n = len(s)
	mod = 10 ** 9 + 7
	dp = [0] * (10 ** 5 + 1)
	dp[1] = 1
	dp[2] = 2
	for i in range(3, 10 ** 5 + 1):
		dp[i] = (dp[i - 1] + dp[i - 2]) % mod
	res = 1
	u = 0
	m = 0
	for i in range(n):
		if s[i] == 'w' or s[i] == 'm':
			print(0)
			return
		if s[i] == 'n':
			u += 1
			if m > 0:
				res = res * dp[m] % mod
			m = 0
		elif s[i] == 'u':
			m += 1
			if u > 0:
				res = res * dp[u] % mod
			u = 0
		else:
			if u > 0:
				res = res * dp[u] % mod
			u = 0
			if m > 0:
				res = res * dp[m] % mod
			m = 0
	if u > 0:
		res = res * dp[u] % mod
	u = 0
	if m > 0:
		res = res * dp[m] % mod
	m = 0
	print(res)
main()


s = input()
m = int(1000000000.0 + 7)
d = [1 for i in range(len(s))]
f = [0 for i in range(100001)]
f[1] = 1
f[2] = 2
g = []
for i in range(3, 100001):
	f[i] = (f[i - 1] + f[i - 2]) % m
for i in range(1, len(s)):
	if s[i] == s[i - 1] and s[i] in 'un':
		d[i] = d[i - 1] + 1
	else:
		g.append(d[i - 1])
g.append(d[-1])
g = [gi for gi in g if gi > 1]
if 'm' in s or 'w' in s:
	print(0)
else:
	ans = 1
	for gi in g:
		ans *= f[gi]
		ans %= m
	print(ans)


MOD = int(10 ** 9 + 7)
s = str(input())
for x in s:
	if x == 'm' or x == 'w':
		print(0)
		quit()

def add(a, b):
	c = a + b
	if c >= MOD:
		c -= MOD
	return c
dp = list((0 for x in range(len(s) + 1)))
dp[0] = 1
for i in range(0, len(s)):
	dp[i + 1] = dp[i]
	if i > 0 and s[i] == 'n' and (s[i - 1] == 'n'):
		dp[i + 1] = add(dp[i + 1], dp[i - 1])
	if i > 0 and s[i] == 'u' and (s[i - 1] == 'u'):
		dp[i + 1] = add(dp[i + 1], dp[i - 1])
print(dp[-1])


s = input()
if 'w' in s or 'm' in s:
	print(0)
else:
	mod = 10 ** 9 + 7
	dp = [0] * (len(s) + 1)
	dp[0] = 1
	dp[1] = 1
	for i in range(2, len(s) + 1):
		if s[i - 1] == s[i - 2] == 'n':
			dp[i] = (dp[i - 1] + dp[i - 2]) % mod
		elif s[i - 1] == s[i - 2] == 'u':
			dp[i] = (dp[i - 1] + dp[i - 2]) % mod
		else:
			dp[i] = dp[i - 1] % mod
	print(dp[-1] % mod)


s = input()
n = len(s)
res = [0] * 10 ** 5
p = 0
ans = 1
mmax = 0
k = 0
mod = 10 ** 9 + 7
for i in range(n):
	if s[i] == 'm' or s[i] == 'w':
		print(0)
		exit()
	elif i < k:
		pass
	elif s[i] == 'n':
		cnt = 0
		for k in range(i, n):
			if s[k] == 'n':
				cnt += 1
			else:
				break
		if cnt > 1:
			res[p] = cnt
			if cnt > mmax:
				mmax = cnt
			p += 1
	elif s[i] == 'u':
		cnt = 0
		for k in range(i, n):
			if s[k] == 'u':
				cnt += 1
			else:
				break
		if cnt > 1:
			res[p] = cnt
			if cnt > mmax:
				mmax = cnt
			p += 1
fib = [1, 1] + [0] * (mmax - 1)
for i in range(2, mmax + 1):
	fib[i] = (fib[i - 1] + fib[i - 2]) % mod
for i in res:
	if i != 0:
		ans *= fib[i] % mod
	else:
		break
print(ans % mod)


def fibonacci(n, m):
	f = [0] * max(n, 2)
	f[0] = 2
	f[1] = 3
	for i in range(2, n):
		f[i] = (f[i - 1] + f[i - 2]) % m
	return f
mod = 10 ** 9 + 7
s = input()
fib = fibonacci(len(s), mod)
if 'm' in s or 'w' in s:
	print(0)
else:
	(cnt, n) = ([], 0)
	for i in range(1, len(s)):
		if s[i] == s[i - 1]:
			if s[i] == 'n' or s[i] == 'u':
				n += 1
		elif n > 0:
			cnt.append(n)
			n = 0
	if n > 0:
		cnt.append(n)
	res = 1
	for c in cnt:
		res = res * fib[c - 1] % mod
	print(res)


import math

def fib(n):
	n = n - 1
	q = 1
	w = 1
	for i in range(n):
		(q, w) = ((q + w) % 1000000007, q)
	return q
s = input()
chn = 0
Nn = 0
Nu = 0
chu = 0
Arn = []
Aru = []
ans = 1
for i in range(len(s)):
	if s[i] == 'w' or s[i] == 'm':
		ans = 0
		break
	if s[i] == 'n':
		Nn = Nn + 1
		chn = 1
	if s[i] != 'n' and chn:
		chn = 0
		if Nn >= 2:
			Arn.append(Nn)
		Nn = 0
	if s[i] == 'u':
		Nu = Nu + 1
		chu = 1
	if s[i] != 'u' and chu:
		chu = 0
		if Nu >= 2:
			Aru.append(Nu)
		Nu = 0
if Nn >= 2:
	Arn.append(Nn)
if Nu >= 2:
	Aru.append(Nu)
for i in range(len(Arn)):
	ans = ans * fib(Arn[i]) % 1000000007
for i in range(len(Aru)):
	ans = ans * fib(Aru[i]) % 1000000007
print(ans)


s = input()
if 'm' in s or 'w' in s:
	print(0)
	exit()
n = len(s)
li = [1] * n
for i in range(1, n):
	li[i] = li[i - 1]
	if s[i] == s[i - 1] == 'u' or s[i] == s[i - 1] == 'n':
		li[i] = li[i - 1] + (li[i - 2] if i > 1 else 1)
	li[i] = li[i] % 1000000007
print(li[n - 1])


s = input()
k = 0
if 'm' in s or 'w' in s:
	k = 0
else:
	n = len(s)
	mod = 1000000007
	a = [0] * (n + 1)
	a[0] = 1
	a[1] = 1
	for i in range(2, n + 1):
		a[i] = a[i - 1]
		if s[i - 1] == s[i - 2] and (s[i - 1] == 'u' or s[i - 1] == 'n'):
			a[i] = (a[i - 1] + a[i - 2]) % mod
	k = a[n]
print(k)


from sys import stdin

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))

def solve(n, m):
	if n >= m:
		return n - m
	if m % 2:
		return 1 + solve(n, m + 1)
	return 1 + solve(n, m // 2)
MOD = 10 ** 9 + 7

def main():
	st = input()
	if st.count('m') > 0 or st.count('w') > 0:
		print(0)
	else:
		n = len(st)
		dp = [1, 1] + [0] * (n - 1)
		for i in range(2, n + 1):
			dp[i] = dp[i - 1]
			if st[i - 1] == st[i - 2] and (st[i - 1] == 'u' or st[i - 1] == 'n'):
				dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
		print(dp[-1])
TestCases = False
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect
from collections import deque, defaultdict, OrderedDict
import collections
N = 100009
factorialNumInverse = [None] * (N + 1)
naturalNumInverse = [None] * (N + 1)
fact = [None] * (N + 1)

def InverseofNumber(p):
	naturalNumInverse[0] = naturalNumInverse[1] = 1
	for i in range(2, N + 1, 1):
		naturalNumInverse[i] = naturalNumInverse[p % i] * (p - int(p / i)) % p

def InverseofFactorial(p):
	factorialNumInverse[0] = factorialNumInverse[1] = 1
	for i in range(2, N + 1, 1):
		factorialNumInverse[i] = naturalNumInverse[i] * factorialNumInverse[i - 1] % p

def factorial(p):
	fact[0] = 1
	for i in range(1, N + 1):
		fact[i] = fact[i - 1] * i % p

def Binomial(N, R, p):
	ans = fact[N] * factorialNumInverse[R] % p * factorialNumInverse[N - R] % p
	return ans

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	p = 1000000007
	InverseofNumber(p)
	InverseofFactorial(p)
	factorial(p)
	for _ in range(1):
		s = rs()
		s = '0' + s + '0'
		c1 = 0
		c2 = 0
		z = []
		t = 0
		for i in range(len(s)):
			if s[i] == 'n':
				c1 += 1
			else:
				if c1 > 0:
					z.append(c1)
				c1 = 0
			if s[i] == 'u':
				c2 += 1
			else:
				if c2 > 0:
					z.append(c2)
				c2 = 0
			if s[i] == 'w' or s[i] == 'm':
				t = 1
				break
		if t == 1:
			print(0)
		else:
			k = []
			for i in z:
				parans = 0
				for j in range(i // 2 + 1):
					a = i - j
					parans += Binomial(a, j, p)
				k.append(parans)
			ans = 1
			for i in k:
				ans = ans * i % p
			print(ans)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


s = '0' + input()
dp = [1] * len(s)
for i in range(1, len(s)):
	if s[i] in ['m', 'w']:
		print(0)
		break
	if i > 1 and s[i] == s[i - 1] == 'u' or s[i] == s[i - 1] == 'n':
		dp[i] = (dp[i - 2] + dp[i - 1]) % (10 ** 9 + 7)
	else:
		dp[i] = dp[i - 1]
else:
	print(dp[len(s) - 1])


def solve():
	inp = input()
	if set(['w', 'm']) & set(inp):
		print(0)
		return
	n = len(inp)
	inp += '       '
	mod = 10 ** 9 + 7

	def add(a, b):
		return (a % mod + b % mod) % mod
	dp = [0 for i in range(len(inp) + 10)]
	dp[0] = 1
	for i in range(n):
		dp[i + 1] = add(dp[i + 1], dp[i])
		if inp[i + 1] == inp[i] and inp[i] in ['u', 'n']:
			dp[i + 2] = add(dp[i + 2], dp[i])
	print(dp[n])
	return
solve()


q = 10 ** 9 + 7
max_limit = 10 ** 5 + 2
fibo = [1] * max_limit
fibo[0] = fibo[1] = 1
for i in range(2, max_limit):
	fibo[i] = (fibo[i - 1] + fibo[i - 2]) % q
s = input() + ' '
no_string = False
u = n = 0
a = b = 1
for i in s:
	if i == 'u':
		u += 1
	else:
		a = a * [1, fibo[u]][u > 0] % q
		u = 0
	if i == 'n':
		n += 1
	else:
		b = b * [1, fibo[n]][n > 0] % q
		n = 0
	if i in ['m', 'w']:
		no_string = True
		break
print([a * b % q, 0][no_string])


from collections import defaultdict as dc
from collections import deque as dq
from bisect import bisect_left, bisect_right, insort_left
import sys
import math
mod = 10 ** 9 + 7

def bs(a, x):
	i = bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return len(a)

def inp():
	p = int(input())
	return p

def line():
	p = list(map(int, input().split()))
	return p

def bs(a, b):
	l = a
	r = b + 1
	x = b
	ans = 0
	while l < r:
		mid = (l + r) // 2
		if x | mid > ans:
			ans = x | mid
			l = mid + 1
		else:
			r = mid
	return ans

def digit(n):
	a = []
	while n > 0:
		a.append(n % 10)
		n = n // 10
	return a

def fibo(n, p):
	a = 1
	b = 1
	for i in range(2, n + 1):
		c = a + b
		a = b
		b = c
		if p[i] == 1:
			p[i] = c
s = str(input())
n = len(s)
p = []
i = 0
k = 0
while i < n:
	if s[i] == 'm' or s[i] == 'w':
		k = 1
	elif s[i] == 'u' or s[i] == 'n':
		c = 1
		while i + 1 < n and s[i] == s[i + 1]:
			c += 1
			i += 1
		p.append(c)
	i += 1
if k == 1:
	print(0)
elif len(p) == 0:
	print(1)
else:
	l = max(p)
	r = dc(int)
	for i in range(len(p)):
		r[p[i]] = 1
	q = fibo(l, r)
	ans = 1
	for i in range(len(p)):
		ans = ans % mod * (r[p[i]] % mod) % mod
	print(ans)


a = input()
l = [1, 1]
if 'm' in a or 'w' in a:
	print(0)
else:
	for i in range(1, len(a)):
		if a[i] == a[i - 1] and a[i] == 'n':
			l.append((l[-1] + l[-2]) % (10 ** 9 + 7))
		elif a[i] == a[i - 1] and a[i] == 'u':
			l.append((l[-1] + l[-2]) % (10 ** 9 + 7))
		else:
			l.append(l[-1] % (10 ** 9 + 7))
		l = [l[-2], l[-1]]
	print(l[-1])


import sys
import math
from collections import Counter
input = sys.stdin.readline
sys.setrecursionlimit(100000)
MOD = 1000000007

def getN():
	return int(input())

def getList():
	return list(map(int, input().split()))

def solve():
	seqs = []
	tmp = 'X'
	seq = 0
	st = input().strip()
	n = len(st)
	for ch in st:
		if ch == 'm' or ch == 'w':
			print(0)
			return
		elif ch in ['u', 'n']:
			if tmp == ch:
				seq += 1
			else:
				if seq != 0:
					seqs.append(seq)
				seq = 1
		else:
			if seq != 0:
				seqs.append(seq)
			seq = 0
		tmp = ch
	if seq != 0:
		seqs.append(seq)
	nst = [0 for i in range(n + 2)]
	mst = [0 for i in range(n + 2)]
	nst[1] = 1
	for i in range(2, n + 1):
		nst[i] = (nst[i - 1] + mst[i - 1]) % MOD
		mst[i] = nst[i - 1] % MOD
	ans = 1
	for seq in seqs:
		ans *= nst[seq] + mst[seq]
		ans %= MOD
	print(ans)
	return

def main():
	solve()
main()


def fib(n):
	if n == 0:
		return 1
	elif n < 4:
		return n
	a = 2
	b = 3
	for i in range(4, n + 1):
		c = a + b
		a = b
		b = c
	return c
ans = 1
s = input()
no_str = False
i = 0
while i < len(s):
	if s[i] == 'm' or s[i] == 'w':
		no_str = True
		break
	if s[i] == 'u' or s[i] == 'n':
		c = s[i]
		runlen = 0
		while i < len(s) and s[i] == c:
			runlen += 1
			i += 1
		ans *= fib(runlen)
		i -= 1
	i += 1
if no_str == True:
	print(0)
else:
	print(ans % (10 ** 9 + 7))


mod = 10 ** 9 + 7
dp = [0 for i in range(10 ** 5 + 1)]
dp[0] = 1
dp[1] = 1
dp[2] = 2
for i in range(3, 10 ** 5 + 1):
	dp[i] = (dp[i - 2] % mod + dp[i - 1]) % mod
string = input()
final = 1
count_u = 0
count_n = 0
possible = True
for i in range(len(string)):
	if string[i] == 'w' or string[i] == 'm':
		possible = False
		break
	if string[i] == 'u' and (i > 0 and string[i] == string[i - 1] or i == 0):
		count_u += 1
	else:
		final = final * dp[count_u] % mod
		count_u = 1
	if string[i] == 'n' and (i > 0 and string[i] == string[i - 1] or i == 0):
		count_n += 1
	else:
		final = final * dp[count_n] % mod
		count_n = 1
final = final * dp[count_n] % mod
final = final * dp[count_u] % mod
if possible:
	print(final)
else:
	print(0)


def fib(x):
	(a1, a2) = (1, 1)
	i = 2
	while i <= x:
		(a1, a2) = (a2, a1 + a2)
		i += 1
	return a2

def prod(a):
	p = 1
	for i in a:
		p *= i
	return p
s = input()
if 'm' in s or 'w' in s:
	print(0)
else:
	(nn, nu) = (0, 0)
	a = []
	for i in range(len(s)):
		if s[i] != 'n' and nn > 0:
			a.append(fib(nn))
			nn = 0
		if s[i] != 'u' and nu > 0:
			a.append(fib(nu))
			nu = 0
		if s[i] == 'n':
			nn += 1
		elif s[i] == 'u':
			nu += 1
	if nn > 1:
		a.append(fib(nn))
	elif nu > 1:
		a.append(fib(nu))
	c = prod(a)
	print(c % (10 ** 9 + 7))


fib = [0, 1, 2]
modu = 10 ** 9 + 7
for i in range(3, 10 ** 5):
	fib.append((fib[i - 1] + fib[i - 2]) % modu)
x = input()
mf = 0
wf = 0
n = len(x)
i = 0
op = 1
while i < n:
	if x[i] == 'm':
		mf = 1
	elif x[i] == 'w':
		wf = 1
	c = 1
	while i < n - 1 and x[i] == 'u' and (x[i + 1] == 'u'):
		c += 1
		i += 1
	if c > 1:
		op = op * fib[c] % modu
	c = 1
	while i < n - 1 and x[i] == 'n' and (x[i + 1] == 'n'):
		c += 1
		i += 1
	if c > 1:
		op = op * fib[c] % modu
	i += 1
if mf or wf:
	print(0)
else:
	print(op)


import time
import sys
input = sys.stdin.buffer.readline
ddd = 10 ** 9 + 7
s = list(input())
prev = s[0]
flists = []
ucount = 0
ncount = 0
i = 0
if 109 in s or 119 in s:
	print(0)
else:
	while i < len(s):
		while i < len(s) and s[i] == 117:
			ucount += 1
			i += 1
		if ucount:
			flists.append(ucount)
			ucount = 0
		while i < len(s) and s[i] == 110:
			ncount += 1
			i += 1
		if ncount:
			flists.append(ncount)
			ncount = 0
		while i < len(s) and s[i] not in [117, 110]:
			i += 1
	if len(flists) == 0:
		print(1)
	else:
		x = [0] * (max(flists) + 1)
		x[0] = 1
		x[1] = 1
		t1 = time.time()
		for i in range(2, len(x)):
			x[i] = (x[i - 1] + x[i - 2]) % ddd
		t2 = time.time()
		rem = 1
		for i in flists:
			rem = rem * x[i] % ddd
		print(rem)


import sys
mod = 10 ** 9 + 7
fast_reader = sys.stdin.readline
fast_writer = sys.stdout.write

def input():
	return fast_reader().strip()

def print(*argv):
	fast_writer(' '.join((str(i) for i in argv)))
	fast_writer('\n')
for _ in range(1):
	s = input()
	if 'm' in s or 'w' in s:
		print(0)
	else:
		dp = [1 for i in range(len(s) + 1)]
		for i in range(2, len(dp)):
			if s[i - 1] + s[i - 2] == 'uu' or s[i - 1] + s[i - 2] == 'nn':
				dp[i] = (dp[i - 1] + dp[i - 2]) % mod
			else:
				dp[i] = dp[i - 1]
		print(dp[-1])


_MODER = 10 ** 9 + 7

def solve(s):
	if 'm' in s or 'w' in s:
		return 0
	l = len(s)
	t = [[0, 0] for _ in range(l)]
	t[0][0] = 1
	for i in range(1, l):
		t[i][0] = sum(t[i - 1]) % _MODER
		if s[i - 1:i + 1] == 'uu' or s[i - 1:i + 1] == 'nn':
			t[i][1] = t[i - 1][0]
	return sum(t[l - 1]) % _MODER
s = input()
r = solve(s)
print(r)


def fib(x1, x2, n):
	if n == 1:
		return x1
	if n == 2:
		return x2
	cur = 1
	while cur < n - 1:
		cur += 1
		(x1, x2) = (x2, x1 + x2)
	return x2
s = input()
i = 0
res = 1
for i in s:
	if i == 'm' or i == 'w':
		print(0)
		exit(0)
i = 0
while i < len(s):
	if s[i] == 'n':
		j = i
		c = 0
		while j < len(s) and s[j] == 'n':
			c += 1
			j += 1
			i += 1
		res *= fib(1, 2, c)
		continue
	if s[i] == 'u':
		j = i
		c = 0
		while j < len(s) and s[j] == 'u':
			c += 1
			j += 1
			i += 1
		res *= fib(1, 2, c)
		continue
	i += 1
print(res % (10 ** 9 + 7))


s = input()
n = len(s)
A = []
mod = 10 ** 9 + 7
L = [0, 1, 2]
for i in range(10 ** 5 + 3):
	L.append((L[-1] + L[-2]) % mod)
nn = 0
uu = 0
for i in range(n):
	if s[i] == 'n':
		if nn == 0:
			nn = 1
			A.append(1)
		else:
			A[-1] += 1
	else:
		nn = 0
	if s[i] == 'u':
		if uu == 0:
			uu = 1
			A.append(1)
		else:
			A[-1] += 1
	else:
		uu = 0
ans = 1
for i in range(len(A)):
	ans = ans * L[A[i]] % mod
if s.count('m') > 0 or s.count('w') > 0:
	ans = 0
print(ans)


st = input()
pre1 = 1
pre2 = 0
ans = 1
for i in range(len(st)):
	if 'm' == st[i] or 'w' == st[i]:
		print(0)
		exit(0)
	elif st[i] == st[i - 1] and (st[i] == 'u' or st[i] == 'n'):
		ans = (pre1 + pre2) % (10 ** 9 + 7)
	pre2 = pre1
	pre1 = ans
print(ans)


import sys
input = sys.stdin.readline
S = input().strip() + '?'
if 'm' in S or 'w' in S:
	print(0)
	return
mod = 10 ** 9 + 7
DP0 = [0] * (10 ** 5 + 1)
DP1 = [0] * (10 ** 5 + 1)
DP0[1] = DP0[2] = 1
DP1[2] = 1
for i in range(3, 10 ** 5 + 1):
	DP0[i] = DP0[i - 1] + DP1[i - 1]
	DP1[i] = DP0[i - 2] + DP1[i - 2]
	DP0[i] %= mod
	DP1[i] %= mod
ANS = 1
NOW = '?'
count = 0
for s in S:
	if s == 'u' and NOW == 'u':
		count += 1
	elif s == 'u' and NOW != 'u':
		if count != 0:
			ANS = ANS * (DP0[count] + DP1[count]) % mod
		count = 1
		NOW = 'u'
	elif s == 'n' and NOW == 'n':
		count += 1
	elif s == 'n' and NOW != 'n':
		if count != 0:
			ANS = ANS * (DP0[count] + DP1[count]) % mod
		count = 1
		NOW = 'n'
	else:
		if count != 0:
			ANS = ANS * (DP0[count] + DP1[count]) % mod
		count = 0
		NOW = '?'
print(ANS)


import time
f = [0] * (10 ** 5 + 2)

def fib(n):
	if n == 0:
		return 0
	if n == 1 or n == 2:
		f[n] = 1
		return f[n]
	if f[n]:
		return f[n]
	if n & 1:
		k = (n + 1) // 2
	else:
		k = n // 2
	if n & 1:
		f[n] = fib(k) * fib(k) + fib(k - 1) * fib(k - 1)
	else:
		f[n] = (2 * fib(k - 1) + fib(k)) * fib(k)
	return f[n]
s = input()
k = 1
n = 0
u = 0
for i in s:
	if i == 'm' or i == 'w':
		k = 0
		break
	if i == 'u':
		k *= fib(n + 1)
		n = 0
		u += 1
	elif i == 'n':
		k *= fib(u + 1)
		u = 0
		n += 1
	else:
		k *= fib(u + 1) * fib(n + 1)
		u = 0
		n = 0
k *= fib(u + 1) * fib(n + 1)
print(k % (10 ** 9 + 7))


from sys import stdin, stdout
from collections import Counter

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
s = input()
m = 10 ** 9 + 7
n = len(s)
fib = [1, 1]
for i in range(2, 10 ** 5 + 14):
	fib.append((fib[i - 1] + fib[i - 2]) % m)
if 'm' in s or 'w' in s:
	print(0)
	exit()
i = j = 0
ans = 1
while j < n and i < n:
	while j < n and s[i] == s[j]:
		j += 1
	if s[i] == 'u' or s[i] == 'n':
		ans = ans * fib[j - i] % m
	i = j
op(ans)


word = input()
total = 1
curr = 1
prev = 1
for (i, c) in enumerate(word):
	if i > 0 and c == word[i - 1] and (c in ['n', 'u']):
		(curr, prev) = (curr + prev, curr)
	elif c in ['m', 'w']:
		print(0)
		raise SystemExit()
	elif curr != 1:
		total *= curr
		curr = 1
		prev = 1
if curr != 1:
	total *= curr
print(total % (int(1000000000.0) + 7))


from sys import stdout, stdin, exit
for i in stdin:
	s = i.strip()
	break
U = []
N = []
mode = '0'
k = 0
for i in s:
	if i == 'w':
		stdout.write('0')
		exit(0)
	elif i == 'm':
		stdout.write('0')
		exit(0)
	elif i == 'n':
		if mode == 'u':
			U.append(k)
			k = 0
		mode = 'n'
		k += 1
	elif i == 'u':
		if mode == 'n':
			N.append(k)
			k = 0
		k += 1
		mode = 'u'
	elif mode == 'u':
		U.append(k)
		k = 0
		mode = '0'
	elif mode == 'n':
		N.append(k)
		k = 0
		mode = '0'
if mode == 'n':
	N.append(k)
if mode == 'u':
	U.append(k)
p = [[[0, 1], [1, 1]]]

def m_dot(A, B):
	x1 = A[0][0]
	x2 = A[0][1]
	x3 = A[1][0]
	x4 = A[1][1]
	y1 = B[0][0]
	y2 = B[0][1]
	y3 = B[1][0]
	y4 = B[1][1]
	a = x1 * y1 + x2 * y3
	b = x1 * y2 + x2 * y4
	c = x3 * y1 + x4 * y3
	d = x3 * y2 + x4 * y4
	return [[a, b], [c, d]]

def f(x):
	global p
	for i in range(x - len(p) + 1):
		p.append(m_dot(p[-1], p[-1]))

def decomp(x):
	l = []
	while x:
		l.append(x % 2)
		x = x // 2
	return list(reversed([i for i in range(len(l)) if l[i]]))

def fib(x):
	global p
	x = decomp(x)
	if x[0] >= len(p):
		f(x[0])
	a = p[x[0]]
	for i in x[1:]:
		a = m_dot(a, p[i])
	b = [1, 1]
	c = [b[0] * a[0][0] + b[1] * a[1][0], b[0] * a[0][1] + b[1] * a[1][1]]
	return c
k = 1
for i in U + N:
	k = k * fib(i)[0] % (10 ** 9 + 7)
stdout.write(str(k % (10 ** 9 + 7)))


import sys
s = input()
D = []
D.append(1)
mod = 1000000007
for i in range(len(s)):
	if s[i] == 'm' or s[i] == 'w':
		print(0)
		sys.exit(0)
	if i > 0:
		if s[i] == s[i - 1] and (s[i] == 'u' or s[i] == 'n'):
			if i >= 2:
				D.append((D[i - 1] + D[i - 2]) % mod)
			else:
				D.append((D[i - 1] + 1) % mod)
		else:
			D.append(D[i - 1])
print(D[len(s) - 1])


from itertools import groupby
from math import sqrt, ceil
from sys import stdin
input = stdin.readline
s = input()
res = 1
fib = [0] * (10 ** 5 + 1)
(fib[0], fib[1]) = (1, 1)
for i in range(2, 10 ** 5 + 1):
	fib[i] = (fib[i - 1] + fib[i - 2]) % 1000000007
for (i, j) in groupby(s):
	if i == 'm' or i == 'w':
		print(0)
		exit()
	if i == 'n' or i == 'u':
		n = len(list(j))
		res = res * fib[n] % (10 ** 9 + 7)
print(res)


S = '*' + input()
if 'm' in S or 'w' in S:
	print(0)
	exit()
dp = [0] * (len(S) + 1)
dp[0] = 1
mod = 10 ** 9 + 7
for i in range(1, len(S)):
	dp[i] = (dp[i] + dp[i - 1]) % mod
	if S[i] == 'u' and S[i - 1] == 'u' or (S[i] == 'n' and S[i - 1] == 'n'):
		dp[i + 1] = (dp[i + 1] + dp[i - 1]) % mod
print((dp[-1] + dp[-2]) % mod)


from itertools import groupby
dp0 = [0, 1]
dp1 = [0, 0]
(d0, d1) = (1, 0)
A = [0, 1]
mod = 10 ** 9 + 7
for i in range(2, 101010):
	(d0, d1) = ((d0 + d1) % mod, d0)
	dp0.append(d0)
	dp1.append(d1)
	A.append(d0 + d1)
S = input()
ans = 1
for (c, g) in groupby(S):
	if c == 'n' or c == 'u':
		n = len(list(g))
		ans = ans * A[n] % mod
	elif c == 'm' or c == 'w':
		ans = 0
print(ans)


wlist = list(input())
p = 1
n = 0
m = 0
nlist = [1, 2]
for i in range(100000):
	nlist.append((nlist[i] + nlist[i + 1]) % (10 ** 9 + 7))
for i in range(len(wlist)):
	if wlist[i] == 'm' or wlist[i] == 'w':
		p = 0
		break
	if wlist[i] == 'u':
		n += 1
		if i == len(wlist) - 1:
			p *= nlist[n - 1]
			p = p % (10 ** 9 + 7)
			n = 0
	if wlist[i] != 'u' and n != 0:
		p *= nlist[n - 1]
		p = p % (10 ** 9 + 7)
		n = 0
for i in range(len(wlist)):
	if wlist[i] == 'm' or wlist[i] == 'w':
		p = 0
		break
	if wlist[i] == 'n':
		m += 1
		if i == len(wlist) - 1:
			p *= nlist[m - 1]
			p = p % (10 ** 9 + 7)
			m = 0
	if wlist[i] != 'n' and m != 0:
		p *= nlist[m - 1]
		p = p % (10 ** 9 + 7)
		m = 0
print(p)


mx = 10 ** 9 + 7

def cal():
	dp = [1] * (len(s) + 1)
	for i in range(len(s) - 2, -1, -1):
		if s[i] == 'u':
			if s[i + 1] == 'u':
				dp[i] = (dp[i + 1] + dp[i + 2]) % mx
			else:
				dp[i] = dp[i + 1] % mx
		elif s[i] == 'n':
			if s[i + 1] == 'n':
				dp[i] = (dp[i + 1] + dp[i + 2]) % mx
			else:
				dp[i] = dp[i + 1] % mx
		else:
			dp[i] = dp[i + 1] % mx
	return dp[0] % mx
s = input()
if 'm' in s or 'w' in s:
	print(0)
else:
	print(cal())


mod = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10 ** 6)
from sys import stdin, stdout
import bisect
from bisect import bisect_left as bl
from bisect import bisect_right as br
import itertools
import collections
import math
import heapq
import random

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def main():
	a = [1, 1]
	for i in range(2, 100001):
		a.append((a[-1] % mod + a[-2] % mod) % mod)
	s = sin()
	j = 0
	ans = 1
	pp = 1
	for i in s:
		if i == 'u':
			j += 1
		else:
			if j > 0:
				ans = ans % mod * a[j] % mod
			j = 0
	if j > 0:
		ans = ans % mod * a[j] % mod
	j = 0
	for i in s:
		if i == 'n':
			j += 1
		else:
			if j > 0:
				ans = ans % mod * a[j] % mod
			j = 0
		if i == 'm' or i == 'w':
			ans = 0
	if j > 0:
		ans = ans % mod * a[j] % mod
	print(ans)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import sys

class ostream:

	def __lshift__(self, a):
		sys.stdout.write(str(a))
		return self
cout = ostream()
endl = '\n'

def readnumbers(zero=0):
	conv = ord if py2 else lambda x: x
	A = []
	numb = zero
	sign = 1
	i = 0
	s = sys.stdin.buffer.read()
	try:
		while True:
			if s[i] >= b'0'[0]:
				numb = 10 * numb + conv(s[i]) - 48
			elif s[i] == b'-'[0]:
				sign = -1
			elif s[i] != b'\r'[0]:
				A.append(sign * numb)
				numb = zero
				sign = 1
			i += 1
	except:
		pass
	if s and s[-1] >= b'0'[0]:
		A.append(sign * numb)
	return A
main()


import sys

def cF(n):
	f = [0, 1, 2]
	for i in range(3, n + 1):
		f.append((f[i - 1] + f[i - 2]) % (10 ** 9 + 7))
	return f

def answer(s, f):
	M = 10 ** 9 + 7
	num_u = 0
	num_n = 0
	combs = []
	for i in range(len(s)):
		if s[i] == 'm' or s[i] == 'w':
			return 0
	for i in range(len(s)):
		if s[i] == 'u':
			num_u += 1
		else:
			if num_u > 1:
				combs.append(num_u)
			num_u = 0
	if num_u > 1:
		combs.append(num_u)
	for i in range(len(s)):
		if s[i] == 'n':
			num_n += 1
		else:
			if num_n > 1:
				combs.append(num_n)
			num_n = 0
	if num_n > 1:
		combs.append(num_n)
	if len(combs) == 0:
		return 1
	num_combs = 1
	for i in range(len(combs)):
		num_combs = num_combs * f[combs[i]] % M
	return num_combs

def main():
	s = sys.stdin.readline().rstrip()
	f = cF(len(s))
	print(answer(s, f))
	return
main()


import math
s = input()
ans = 1
modul = 1000000007
(n, u) = (0, 0)
fib = [0] * 100001
fib[0] = 1
fib[1] = 2
for i in range(2, 100001):
	fib[i] = (fib[i - 1] + fib[i - 2]) % modul
for i in range(len(s) - 1):
	if s[i] == 'n':
		n += 1
		if s[i + 1] != 'n':
			ans *= fib[n - 1]
			ans %= modul
			n = 0
	elif s[i] == 'u':
		u += 1
		if s[i + 1] != 'u':
			ans *= fib[u - 1]
			ans %= modul
			u = 0
	elif s[i] == 'm':
		print(0)
		break
	elif s[i] == 'w':
		print(0)
		break
else:
	if s[len(s) - 1] == 'n' and n > 0:
		n += 1
		ans *= fib[n - 1]
		ans %= modul
		n = 0
		print(ans)
	elif s[len(s) - 1] == 'u' and u > 0:
		u += 1
		ans *= fib[u - 1]
		ans %= modul
		u = 0
		print(ans)
	elif s[len(s) - 1] == 'w' or s[len(s) - 1] == 'm':
		print(0)
	else:
		if n > 0:
			ans *= fib[n - 1]
			ans %= modul
		if u > 0:
			ans *= fib[u - 1]
			ans %= modul
		print(ans)


n = input()
count = 1
for i in n:
	if i in ['w', 'm']:
		print(0)
		exit()
dp = [0] * (len(n) + 1)
dp[0] = 1
dp[1] = 1
for i in range(2, len(n) + 1):
	dp[i] = dp[i - 1]
	if n[i - 1] == n[i - 2] and n[i - 1] in ['u', 'n']:
		dp[i] = (dp[i] + dp[i - 2]) % 1000000007
print(dp[len(n)])


import sys
RI = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
mod = 10 ** 9 + 7
st = ri()
dp = [0] * 2
dp[1] = 1
for i in range(len(st)):
	if st[i] == 'm' or st[i] == 'w':
		dp[1] = 0
		break
	if st[i] == 'n' and st[i - 1] == 'n':
		temp = dp[1]
		dp[1] = (dp[0] + dp[1]) % mod
		dp[0] = temp
	elif st[i] == 'u' and st[i - 1] == 'u':
		temp = dp[1]
		dp[1] = (dp[0] + dp[1]) % mod
		dp[0] = temp
	else:
		dp[0] = dp[1]
print(dp[1])


from sys import stdin, stdout
import collections
import heapq
import itertools
import functools

def read_line():
	return stdin.readline().strip()

def read_int():
	return int(read_line())

def read_arr():
	return read_line().split(' ')

def read_int_arr():
	return [int(x) for x in read_arr()]

def main():
	S = read_line()
	N = len(S)
	if any((c in 'mw' for c in S)):
		print(0)
		return
	f0 = 1
	f1 = 1
	MOD = 10 ** 9 + 7
	for i in range(2, N + 1):
		if S[i - 1] in 'nu' and S[i - 1] == S[i - 2]:
			tmp = f0
			f0 = f1
			f1 += tmp
		else:
			f0 = f1
	print(f1 % MOD)
main()


s = input()
n = len(s)
mod = 10 ** 9 + 7
fib = [1, 1]
for i in range(2, n + 1):
	fib.append((fib[-1] + fib[-2]) % mod)
(ans, i) = (1, 0)
while True:
	x = s[i]
	if x == 'w' or x == 'm':
		print(0)
		exit()
	elif x == 'u':
		cnt = 1
		for j in range(i + 1, len(s)):
			if s[j] == 'u':
				cnt += 1
			else:
				break
		if cnt > 1:
			i = j
			ans *= fib[cnt]
			ans %= mod
		else:
			i += 1
	elif x == 'n':
		cnt = 1
		for j in range(i + 1, len(s)):
			if s[j] == 'n':
				cnt += 1
			else:
				break
		if cnt > 1:
			i = j
			ans *= fib[cnt]
			ans %= mod
		else:
			i += 1
	else:
		i += 1
	if i >= len(s):
		break
print(ans)


import os
import sys
from io import BytesIO, IOBase

def main():
	import bisect
	import math
	alpha = 'abcdefghijklmnopqrstuvwxyz'
	ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
	inf = 1e+17
	mod = 10 ** 9 + 7

	def factorial(n):
		f = 1
		for i in range(1, n + 1):
			f = f * i % mod
		return f

	def ncr(n, r):
		num = den = 1
		for i in range(r):
			num = num * (n - i) % mod
			den = den * (i + 1) % mod
		return num * pow(den, mod - 2, mod) % mod

	def solve(s):
		if 'w' in s or 'm' in s:
			return 0
		dp = [1, 1]
		for i in range(1, len(s)):
			if s[i] == s[i - 1] == 'u' or s[i] == s[i - 1] == 'n':
				dp.append((dp[-1] + dp[-2]) % mod)
			else:
				dp.append(dp[-1])
		return dp[-1] % mod
		pass
	t = 1
	ans = []
	for _ in range(1):
		s = input()
		ans.append(solve(s))
	for j in range(len(ans)):
		print(ans[j])
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from sys import stdin, exit
rem = 10 ** 9 + 7
dp = {'norm': 1, 'last_n': 0, 'last_u': 0}
for i in stdin.readline().strip():
	if i in 'mw':
		print(0)
		return
	if i not in 'nu':
		dp = {'norm': (dp['norm'] + dp['last_n'] + dp['last_u']) % rem, 'last_n': 0, 'last_u': 0}
		continue
	if i == 'u':
		dp = {'norm': dp['last_u'] % rem, 'last_u': (dp['last_u'] + dp['norm'] + dp['last_n']) % rem, 'last_n': 0}
	if i == 'n':
		dp = {'norm': dp['last_n'] % rem, 'last_n': (dp['last_n'] + dp['norm'] + dp['last_u']) % rem, 'last_u': 0}
print((dp['norm'] + dp['last_u'] + dp['last_n']) % rem)


M = 1000000007
s = input()
ans = 1
flag = True
ans = []
curr = 0
for i in range(len(s)):
	if s[i] == 'm' or s[i] == 'w':
		flag = False
		print(0)
		break
	if s[i] == 'u' or s[i] == 'n':
		if i > 0 and s[i] == s[i - 1]:
			curr += 1
		else:
			if i != 0:
				ans.append(curr)
			curr = 1
	elif curr != 0:
		ans.append(curr)
		curr = 0
if curr != 0:
	ans.append(curr)
if flag:
	if len(ans) > 0:
		maxi = max(ans)
	else:
		maxi = 1
	l = [1, 1]
	for i in range(2, maxi + 1):
		l.append((l[i - 1] % M + l[i - 2] % M) % M)
	actualans = 1
	for i in ans:
		actualans = actualans % M * (l[i] % M) % M
	print(actualans)


import math
import bisect
import sys
from collections import OrderedDict
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
MOD = 1000000007
S = insr()
N = len(S)
fl = True
for a in range(N):
	if S[a] == 'm' or S[a] == 'w':
		print(0)
		fl = False
		break
if fl:
	prev = -1
	i = 0
	out = 1
	L = [1]
	while i < N and S[i] != 'n' and (S[i] != 'u'):
		i += 1
	while i < N:
		if S[i] == 'n':
			prev = i
			while i < N and S[i] == 'n':
				i += 1
			curr = i - prev
			L.append(curr)
		if i < N and S[i] == 'u':
			prev = i
			while i < N and S[i] == 'u':
				i += 1
			curr = i - prev
			L.append(curr)
			i -= 1
		i += 1
	mm = max(2, max(L))
	dp = [0 for i in range(mm + 1)]
	dp[1] = 1
	dp[2] = 2
	for j in range(3, mm + 1):
		dp[j] = (dp[j - 1] + dp[j - 2]) % MOD
	out = 1
	for k in L:
		out = out * dp[k] % MOD
	print(out)


import sys
s = sys.stdin.readline().rstrip()
if not s:
	print('0')
	exit(0)
dp = 1
tra = 0
if s[0] in ('u', 'n'):
	tra = 1
if s[0] in ('w', 'm'):
	print(0)
	exit(0)
prev = s[0]
ans = 1
for c in s[1:]:
	if c in ('m', 'w'):
		print(0)
		exit(0)
	if c not in ('u', 'n'):
		tra = 0
		ans = ans * dp % 1000000007
		dp = 1
	if prev != c:
		tra = 1
		ans = ans * dp % 1000000007
		dp = 1
	else:
		tmp = dp
		dp += tra
		tra = tmp
	prev = c
print(ans * dp % 1000000007)


import sys
s = 1
i = input()
if 'm' in i or 'w' in i:
	print(0)
	sys.exit(0)
MOD = 10 ** 9 + 7
x = [1]
for index in range(len(i)):
	s = x[index]
	if index > 0 and (i[index] == 'u' and i[index - 1] == 'u' or (i[index] == 'n' and i[index - 1] == 'n')):
		s = (s + x[index - 1]) % MOD
	x.append(s)
print(s)


from itertools import groupby
s = input()
n = len(s)
if 'w' in s or 'm' in s:
	print('0')
	exit()
mod = 10 ** 9 + 7
fib = [1, 1]
for i in range(2, n + 1):
	fib.append((fib[-1] + fib[-2]) % mod)
res = 1
for (k, g) in groupby(s):
	if k == 'u' or k == 'n':
		l = len(list(g))
		res *= fib[l]
		res %= mod
print(res)


MOD = 10 ** 9 + 7

def fib(n):
	f = [0, 1]
	for i in range(n):
		f.append((f[i] + f[i + 1]) % MOD)
	return f[n + 1] % MOD
s = input()
dp = [1] * (len(s) + 1)
if 'm' in s or 'w' in s:
	print(0)
else:
	for i in range(2, len(dp)):
		dp[i] = dp[i - 1]
		if s[i - 1] == s[i - 2] and (s[i - 1] == 'n' or s[i - 1] == 'u'):
			dp[i] += dp[i - 2] % MOD
	print(dp[-1] % MOD)


s = list(input())
dp = [[0, 0] for i in range(10 ** 5 + 1)]
dp[0][0] = 1
dp[0][1] = 0
mod = 10 ** 9 + 7
for i in range(1, 10 ** 5 + 1):
	dp[i][0] = (dp[i - 1][0] + dp[i - 1][1]) % mod
	dp[i][1] = dp[i - 1][0] % mod
flag = 0
for i in range(len(s)):
	if s[i] == 'm':
		flag = 1
		break
	elif s[i] == 'w':
		flag = 1
		break
if flag == 1:
	print(0)
	exit(0)
count = 1
n = len(s)
i = 0
while i < n:
	c = 0
	if s[i] == 'u':
		j = i
		while s[j] == 'u':
			c += 1
			j += 1
			if j >= n:
				break
		i = j - 1
		c -= 1
		if c == 0:
			i += 1
			continue
		count = count * (dp[c][0] + dp[c][1]) % mod
		count = count % mod
	elif s[i] == 'n':
		j = i
		while s[j] == 'n':
			c += 1
			j += 1
			if j >= n:
				break
		i = j - 1
		c -= 1
		if c == 0:
			i += 1
			continue
		count = count * (dp[c][0] + dp[c][1]) % mod
		count = count % mod
	i += 1
print(count % mod)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def Yes(c):
	return IF(c, 'Yes', 'No')

def main():
	t = 1
	rr = []
	for _ in range(t):
		s = S()
		dp = [1, 0, 0]
		for c in s:
			np = [0] * 3
			t = sum(dp) % mod
			if c == 'u':
				np[0] = dp[1]
				np[1] = t
			elif c == 'n':
				np[0] = dp[2]
				np[2] = t
			elif c in 'mw':
				dp = [0]
				break
			else:
				np[0] = t
			dp = np
		rr.append(sum(dp) % mod)
	return JA(rr, '\n')
print(main())


fac = [1]
p = int(pow(10, 9) + 7)
for i in range(2, 100001):
	fac.append(i % p * (fac[-1] % p) % p)
s = input().rstrip('\n')
if s.count('m') + s.count('w'):
	print(0)
	exit(0)

def modinverse(a, m):
	g = gcd(a, m)
	return power(a, m - 2, m)

def power(x, y, m):
	if y == 0:
		return 1
	p = power(x, y // 2, m) % m
	p = p * p % m
	if y % 2 == 0:
		return p
	else:
		return x * p % m

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def com(n):
	s = 1
	nn = n - 1
	rr = 1
	while nn >= rr:
		fi = fac[nn - 1]
		inv1 = modinverse(fac[rr - 1], p)
		inv2 = modinverse(fac[max(0, nn - rr - 1)], p)
		fi = fi * inv1 * inv2
		fi = fi % p
		s += fi
		nn -= 1
		rr += 1
	return s
st = []
r = 1
for i in s:
	if i == 'u':
		if len(st) == 0:
			st.append('u')
		elif st[-1] == 'u':
			st.append('u')
		else:
			r *= com(len(st)) % p
			st = []
			st.append('u')
	elif i == 'n':
		if len(st) == 0:
			st.append('n')
		elif st[-1] == 'n':
			st.append('n')
		else:
			r *= com(len(st)) % p
			st = []
			st.append('n')
	elif len(st):
		r *= com(len(st)) % p
		st = []
if len(st):
	r *= com(len(st)) % p
print(r % p)


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return list(map(int, input().split()))

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
sys.setrecursionlimit(10 ** 7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
S = input()
N = len(S)
dp = [0] * (N + 1)
dp[0] = 1
for i in range(N):
	if S[i] == 'w' or S[i] == 'm':
		print(0)
		return
	dp[i + 1] += dp[i]
	dp[i + 1] %= MOD
	if i + 2 <= N:
		if S[i] == S[i + 1] == 'u' or S[i] == S[i + 1] == 'n':
			dp[i + 2] += dp[i]
			dp[i + 2] %= MOD
print(dp[N])


import sys
s = sys.stdin.readline()[:-1]

def fibonacci(n):
	(a, b) = (1, 2)
	for i in range(n - 1):
		(a, b) = (b, a + b)
	return a
for i in s:
	if i == 'w' or i == 'm':
		sys.stdout.write('0' + '\n')
		exit(0)
temp1 = []
count = 0
for i in range(len(s)):
	if s[i] != 'u':
		temp1.append(count)
		count = 0
	else:
		count += 1
temp1.append(count)
num_u = 1
for i in range(len(temp1)):
	if temp1[i] == 0:
		continue
	else:
		num_u *= fibonacci(temp1[i])
temp2 = []
count2 = 0
for i in range(len(s)):
	if s[i] != 'n':
		temp2.append(count2)
		count2 = 0
	else:
		count2 += 1
temp2.append(count2)
num_n = 1
for i in range(len(temp2)):
	if temp2[i] == 0:
		continue
	else:
		num_n *= fibonacci(temp2[i])
flag = 0
for i in range(len(temp1)):
	if temp1[i] > 1:
		flag = 1
		break
for i in range(len(temp2)):
	if temp2[i] > 1:
		flag = 1
		break
if flag == 0:
	sys.stdout.write('1' + '\n')
else:
	sys.stdout.write(str(num_n * num_u % 1000000007) + '\n')


msg = str(input())
modulo = 10 ** 9 + 7

def numberOfStingTurnIntoMessage(msg):
	msgLength = len(msg)
	dp = [0 for _ in range(msgLength + 1)]
	dp[0] = 1
	dp[1] = 1
	for i in range(2, msgLength + 1):
		if (msg[i - 1] == 'u' or msg[i - 1] == 'n') and msg[i - 2] == msg[i - 1]:
			dp[i] = (dp[i - 1] + dp[i - 2]) % modulo
		else:
			dp[i] = dp[i - 1]
	return dp[msgLength]
if msg.count('m') != 0 or msg.count('w') != 0:
	print(0)
else:
	print(numberOfStingTurnIntoMessage(msg))


def fib(n):
	fib = [1, 2]
	if n == 1:
		return 1
	elif n == 2:
		return 2
	i = 2
	while i < n:
		fib.append((fib[i - 1] + fib[i - 2]) % 1000000007)
		i = i + 1
	return fib[n - 1]

def mycount(str, m):
	i = 0
	sum = 0
	temp = 0
	fin = []
	while i < len(str):
		if str[i] == m:
			temp = temp + 1
		elif temp != 0:
			fin.append(temp)
			temp = 0
		else:
			pass
		i = i + 1
	return fin
str = input()
str = str + '?'
if str.count('m') != 0 or str.count('w') != 0:
	print(0)
else:
	num1 = mycount(str, 'n')
	num2 = mycount(str, 'u')
	sum = 1
	i = 0
	j = 0
	while i < len(num1):
		sum = sum * fib(num1[i])
		i = i + 1
	while j < len(num2):
		sum = sum * fib(num2[j])
		j = j + 1
	print(sum % 1000000007)


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import random
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())
sys.setrecursionlimit(10000)

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_right(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		dp = [0, 1, 2]
		l = input()
		for i in range(3, len(l) + 1):
			temp = (dp[-1] % P + dp[-2] % P) % P
			dp.append(temp)
		ans = 1
		count = 1
		last = -1
		flag = 0
		for i in range(len(l)):
			if l[i] == 'm' or l[i] == 'w':
				flag = 1
				break
			if l[i] == last:
				count += 1
			elif last == 'n' or last == 'u':
				ans = ans % P * dp[count] % P % P
				count = 1
				last = l[i]
			else:
				count = 1
				last = l[i]
		if count:
			if last == 'n' or last == 'u':
				ans = ans % P * dp[count] % P % P
		if flag:
			print(0)
		else:
			print(ans)
	except:
		pass
M = 998244353
P = 1000000007
Ma = 100000000000
for _ in range(1):
	main()


s = input()
if s[0] == 'm' or s[0] == 'w':
	print('0')
	exit()
c = 1
ans = 1
mod = 10 ** 9 + 7
MAX = 1000
f = [0] * MAX
mod = 10 ** 9 + 7

def fibonacci(n):
	a = 0
	b = 1
	if n < 0:
		print('Incorrect input')
	elif n == 0:
		return a
	elif n == 1:
		return b
	else:
		for i in range(2, n + 1):
			c = (a % mod + b % mod) % mod
			a = b
			b = c
		return b

def fib(n):
	if n == 0:
		return 0
	if n == 1 or n == 2:
		f[n] = 1
		return f[n]
	if f[n]:
		return f[n]
	if n & 1:
		k = (n + 1) // 2
	else:
		k = n // 2
	if n & 1:
		f[n] = fib(k) * fib(k) + fib(k - 1) * fib(k - 1)
	else:
		f[n] = (2 * fib(k - 1) + fib(k)) * fib(k)
	return f[n]
for i in range(1, len(s)):
	if s[i] == 'm' or s[i] == 'w':
		print('0')
		exit()
	if s[i] == 'n' and s[i - 1] == 'n':
		c += 1
	elif s[i] == 'u' and s[i - 1] == 'u':
		c += 1
	elif c > 1:
		ans = ans % mod * fibonacci(c + 1) % mod % mod
		c = 1
	else:
		c = 1
if c > 1:
	ans = ans % mod * fibonacci(c + 1) % mod % mod
	c = 1
print(ans)


s = input()
m = 10 ** 9 + 7

def solve(s):
	dp = [1] * (len(s) + 1)
	for i in range(len(s)):
		if i == 0:
			dp[i + 1] = 1
		elif s[i] == 'u' and s[i - 1] == 'u' or (s[i] == 'n' and s[i - 1] == 'n'):
			dp[i + 1] = dp[i] % m + dp[i - 1] % m
		else:
			dp[i + 1] = dp[i] % m
	return dp[len(s)] % m
if 'm' in s or 'w' in s:
	print(0)
else:
	print(solve(s) % m)


orignal = input()
count_n = 0
count_u = 0
ans = 1
if orignal[0] == 'u':
	count_u = 1
if orignal[0] == 'n':
	count_n = 1
if orignal[0] == 'w' or orignal[0] == 'm':
	print(0)
else:
	for i in range(1, len(orignal)):
		temp = ans
		if orignal[i] == 'u':
			ans = (ans + count_u) % 1000000007
			count_u = temp
			count_n = 0
		elif orignal[i] == 'n':
			ans = (ans + count_n) % 1000000007
			count_n = temp
			count_u = 0
		else:
			if orignal[i] == 'w' or orignal[i] == 'm':
				ans = 0
				break
			count_u = 0
			count_n = 0
	print(ans)


a = input()
if 'w' in a or 'm' in a:
	print(0)
else:
	dp = [0] * (len(a) + 1)
	(dp[0], dp[1]) = (1, 1)
	for i in range(2, len(a) + 1):
		dp[i] = dp[i - 1] % (10 ** 9 + 7)
		if a[i - 1] == a[i - 2] == 'n' or a[i - 1] == a[i - 2] == 'u':
			dp[i] += dp[i - 2] % (10 ** 9 + 7)
	print(dp[-1] % (10 ** 9 + 7))


import math
import sys
MOD = 1000000007

def fib(n):
	(v1, v2, v3) = (1, 1, 0)
	for rec in bin(n)[3:]:
		calc = v2 * v2
		(v1, v2, v3) = (v1 * v1 + calc, (v1 + v3) * v2, calc + v3 * v3)
		if rec == '1':
			(v1, v2, v3) = (v1 + v2, v1, v2)
	return v2
s = input()
c = 1
prev = ''
run = 0
l = len(s)
for i in range(l + 1):
	if i == l:
		if run > 0:
			cur = fib(run + 1) % MOD
			c = c * cur % MOD
		break
	if s[i] == 'm' or s[i] == 'w':
		c = 0
		break
	if run > 0 and (s[i] != 'n' and prev == 'n' or (s[i] != 'u' and prev == 'u')):
		cur = fib(run + 1) % MOD
		c = c * cur % MOD
		run = 0
		prev = ''
	if s[i] == 'n' and prev == '':
		run = 1
		prev = 'n'
	elif s[i] == 'n' and prev == 'n':
		run = run + 1
	elif s[i] == 'u' and prev == '':
		run = 1
		prev = 'u'
	elif s[i] == 'u' and prev == 'u':
		run = run + 1
print(c)


import random
S = input()
N = len(S)
if 'm' in S or 'w' in S:
	print(0)
	exit(0)
(dp0, dp1, dp2) = (1, 1, 0)
for i in range(1, len(S)):
	dp2 = dp1
	if S[i] in 'un' and S[i] == S[i - 1]:
		dp2 += dp0
	(dp0, dp1) = (dp1, dp2 % (10 ** 9 + 7))
print(dp1)


ans = [0, 1]
p = '@'
s = 1000000007
for i in input():
	if i in 'wm':
		ans[-1] = ans[-2] = 0
	elif i == p and i in 'un':
		(ans[0], ans[1]) = (ans[1], (ans[0] + ans[1]) % s)
	else:
		(ans[0], ans[1]) = (ans[1], ans[1])
		p = i
print(ans[-1])


import math
import bisect
import copy
from collections import defaultdict
from collections import OrderedDict
s = list(input())
n = len(s)
c = []
i = 0
x = 1
while i < n:
	while i < n - 1 and s[i] == s[i + 1] == 'u':
		x += 1
		i += 1
		if i == n - 1 or s[i] != s[i + 1]:
			break
	if x > 1:
		c.append(x)
		x = 1
	while i < n - 1 and s[i] == s[i + 1] == 'n':
		x += 1
		i += 1
		if i == n - 1 or s[i] != s[i + 1]:
			break
	if x > 1:
		c.append(x)
		x = 1
	if x == 1:
		i += 1
fibo = [1, 2]
ans = 0
if n == 1:
	if s[0] == 'w' or s[0] == 'm':
		ans = -1
else:
	for i in range(n):
		if i == 0:
			if s[i] == 'w' and s[i] != s[i + 1]:
				ans = -1
				break
			elif s[i] == 'm' and s[i] != s[i + 1]:
				ans = -1
				break
		elif i == n - 1:
			if s[i] == 'w' and s[i] != s[i - 1]:
				ans = -1
				break
			elif s[i] == 'm' and s[i] != s[i - 1]:
				ans = -1
				break
		elif s[i] == 'w' and s[i - 1] != 'w' and (s[i + 1] != 'w'):
			ans = -1
			break
		elif s[i] == 'm' and s[i - 1] != 'm' and (s[i - 1] != 'm'):
			ans = -1
			break
if ans == -1:
	print(0)
elif len(c) == 0:
	print(1)
else:
	for i in range(2, max(c)):
		fibo.append((fibo[i - 2] + fibo[i - 1]) % int(1000000000.0 + 7))
	ans = 1
	for j in range(len(c)):
		ans *= fibo[c[j] - 1]
		ans %= int(1000000000.0 + 7)
	print(ans)


u = list(input())
q = int(1000000000.0) + 7
n = len(u)
if 'm' in u or 'w' in u:
	print(0)
	return
if n == 1:
	print(1)
	return
dp = [0] * n
dp[0] = 1
dp[1] = 2
for i in range(2, n):
	dp[i] = dp[i - 1] + dp[i - 2]
	dp[i] %= q
ans = 1
w = 0
m = 0
if u[0] == 'u':
	w += 1
elif u[0] == 'n':
	m += 1
for i in range(1, n):
	if u[i] == 'u':
		w += 1
	elif u[i] == 'n':
		m += 1
	if u[i] != 'u' and w != 0:
		ans *= dp[w - 1]
		w = 0
	if u[i] != 'n' and m != 0:
		ans *= dp[m - 1]
		m = 0
	ans %= q
if w != 0:
	ans *= dp[w - 1]
if m != 0:
	ans *= dp[m - 1]
print(ans % q)


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : list(map(int, input().split()))
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
s = si()
n = len(s)
dp = [0] * (n + 2)
dp[0] = 1
dp[1] = 1 if not s[0] in ['m', 'w'] else 0
for i in range(2, n + 1):
	if s[i - 1] in ['m', 'w']:
		exit(print(0))
	dp[i] = dp[i - 1]
	if s[i - 1] == 'n' or s[i - 1] == 'u':
		if s[i - 2] == s[i - 1]:
			dp[i] += dp[i - 2]
			dp[i] %= MOD
print(dp[n])


from sys import stdin
from math import ceil
s = stdin.readline().strip()
f1 = False
for i in s:
	if i == 'm' or i == 'w':
		f1 = True
		break
if f1:
	print(0)
	exit(0)
f = [0 for i in range(len(s) + 4)]
f[0] = 1
f[1] = 1
mod = 10 ** 9 + 7
for i in range(2, len(s) + 2):
	f[i] = (f[i - 2] + f[i - 1]) % mod
arr = [1]
n = 0
u = 0
if s[0] == 'n':
	n += 1
if s[0] == 'u':
	u += 1
for i in range(1, len(s)):
	if s[i] == 'n' and s[i - 1] == 'n':
		n += 1
	elif s[i] == 'u' and s[i - 1] == 'u':
		u += 1
	elif s[i] == 'u':
		u = 1
	elif s[i] == 'n':
		n = 1
	if s[i - 1] == 'n' and s[i] != 'n':
		arr.append(n)
		n = 0
	if s[i - 1] == 'u' and s[i] != 'u':
		arr.append(u)
		u = 0
if s[-1] == 'n':
	arr.append(n)
if s[-1] == 'u':
	arr.append(u)
ans = 1
for i in range(len(arr)):
	ans = ans * f[arr[i]] % mod
print(ans)


s = input()
if 'm' in s or 'w' in s:
	print(0)
elif len(s) == 1:
	print(1)
else:
	ans = []
	ans.append(1)
	j = 0
	if s[1] == s[0] == 'n' or s[1] == s[0] == 'u':
		ans.append(2)
		j = 1
	for i in range(1 + j, len(s)):
		if s[i] == s[i - 1] == 'n' or s[i] == s[i - 1] == 'u':
			ans.append((ans[i - 1] + ans[i - 2]) % (10 ** 9 + 7))
		else:
			ans.append(ans[i - 1])
	print(ans[len(s) - 1])


mas = [0, 1, 2]
b = 0
for i in range(3, 10 ** 5 + 1):
	mas.append((mas[i - 1] + mas[i - 2]) % (10 ** 9 + 7))
ans = 1
s = input()
f = -1
for i in range(len(s)):
	if i >= f:
		if i < len(s) and s[i] == 'n':
			lans = 0
			while i < len(s) and s[i] == 'n':
				lans += 1
				i += 1
			ans *= mas[lans]
			ans = ans % (10 ** 9 + 7)
		if i < len(s) and s[i] == 'u':
			lans = 0
			while i < len(s) and s[i] == 'u':
				lans += 1
				i += 1
			ans *= mas[lans]
			ans = ans % (10 ** 9 + 7)
		if i < len(s) and (s[i] == 'm' or s[i] == 'w'):
			b = 1
			break
		f = i
if b == 1:
	print(0)
else:
	print(ans % (10 ** 9 + 7))


arr = [1, 2]
for i in range(2, 100000):
	z = 10 ** 9 + 7
	arr.append((arr[i - 1] + arr[i - 2]) % z)

def fib(n):
	return arr[n - 2]
s = input() + '0'
if s.find('m') != -1 or s.find('w') != -1:
	print(0)
else:
	okm = 'ns'
	okn = 'ns'
	total = 1
	k = 0
	p = 0
	for el in s:
		if el == 'n' and okn == 'ns':
			okn = 's'
			k += 1
		elif el != 'n' and okn == 's':
			total *= fib(k + 1)
			okn = 'ns'
			k = 0
		elif el == 'n' and okn == 's':
			k += 1
		if el == 'u' and okm == 'ns':
			okm = 's'
			p += 1
		elif el != 'u' and okm == 's':
			total *= fib(p + 1)
			p = 0
			okm = 'ns'
		elif el == 'u' and okm == 's':
			p += 1
	print(total % (10 ** 9 + 7))


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(1):
	s = input()
	n = len(s)
	dp = [1 for i in range(n + 1)]
	if 'm' in s or 'w' in s:
		print(0)
		continue
	for i in range(1, n):
		if not (s[i - 1:i + 1] == 'uu' or s[i - 1:i + 1] == 'nn'):
			dp[i] = dp[i - 1]
		else:
			dp[i] = (dp[i - 1] + dp[i - 2]) % mod
	print(dp[n - 1])


s = input()
n = len(s)
m = 1000000007
dp = [1, 1]
if 'm' in s or 'w' in s:
	print(0)
else:
	for i in range(1, n):
		if s[i] == s[i - 1] and (s[i] == 'u' or s[i] == 'n'):
			dp.append((dp[i] + dp[i - 1]) % m)
		else:
			dp.append(dp[i] % m)
	print(dp[-1])


from math import *
s = input()
pos = [1]
for i in range(len(s)):
	c = s[i]
	if c == 'm' or c == 'w':
		pos[-1] = 0
		break
	if c == 'u' and i > 0 and (s[i - 1] == 'u'):
		pos.append(pos[-1] + pos[-2])
	elif c == 'n' and i > 0 and (s[i - 1] == 'n'):
		pos.append(pos[-1] + pos[-2])
	else:
		pos.append(pos[-1])
	pos[-1] %= 1000000007
print(pos[-1])


import os
import sys
from io import BytesIO, IOBase

def solution(s):
	n = len(s)
	if 'w' in s or 'm' in s:
		write(0)
		return
	N = int(1000000000.0 + 7)
	if n == 1:
		write(1)
	elif n == 2:
		write(2 if s == 'uu' or s == 'nn' else 1)
	else:
		dp = [1, 2] if s[:2] == 'uu' or s[:2] == 'nn' else [1, 1]
		for i in range(2, n):
			if s[i] == s[i - 1] == 'u' or s[i] == s[i - 1] == 'n':
				dp.append((dp[i - 1] + dp[i - 2]) % N)
			else:
				dp.append(dp[i - 1] % N)
		write(dp[-1])

def main():
	solution(input())
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args[:-1]:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(str(args[-1]))
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


s = input()
n = len(s)

def fib(n):
	if n < 1:
		return (1, 0)
	(f_m_1, f_m) = fib(n >> 1)
	if n & 1:
		return (f_m_1 * (f_m_1 + 2 * f_m), f_m ** 2 + f_m_1 ** 2)
	else:
		return (f_m_1 ** 2 + f_m ** 2, f_m * (2 * f_m_1 - f_m))
res = 1
i = 0
while i < n:
	if s[i] == 'm' or s[i] == 'w':
		res = 0
		break
	if s[i] == 'u':
		t = 0
		while i < n and s[i] == 'u':
			t += 1
			i += 1
		else:
			res *= fib(t)[0]
			res = res % 1000000007
	elif s[i] == 'n':
		t = 0
		while i < n and s[i] == 'n':
			t += 1
			i += 1
		else:
			res *= fib(t)[0]
			res = res % 1000000007
	else:
		i += 1
print(res)


def fib(n):
	if n == 2:
		return 2
	else:
		a = 1
		b = 2
		for i in range(3, n + 1):
			c = a + b
			a = b
			b = c
		return c
st = str(input()) + 'z'
num = []
count = 1
flag = 1
for s in range(1, len(st)):
	if st[s - 1] in 'wm':
		flag = 0
		print(0)
		break
	if st[s] == 'u' and st[s - 1] == 'u':
		count += 1
	if st[s] != 'u' and st[s - 1] == 'u':
		if count > 1:
			num.append(count)
		count = 1
	if st[s] == 'n' and st[s - 1] == 'n':
		count += 1
	if st[s] != 'n' and st[s - 1] == 'n':
		if count > 1:
			num.append(count)
		count = 1
if flag == 1:
	if len(num) == 0:
		print(1)
	elif len(num) == 1:
		print(fib(num[0]))
	else:
		z = fib(num[0])
		for k in range(1, len(num)):
			z = z * fib(num[k])
		print(z % (10 ** 9 + 7))
else:
	pass


s = input()
n = len(s)
dp = [1, 1]
flag = 0
for i in range(1, n):
	if s[i] == 'w' or s[i] == 'm':
		print(0)
		flag = 1
		break
	if s[i] == 'u' and s[i - 1] == 'u' or (s[i] == 'n' and s[i - 1] == 'n'):
		temp = dp[0] + dp[1]
		dp[0] = dp[1]
		dp[1] = temp % 1000000007
	else:
		dp[0] = dp[1]
if flag == 0:
	if s[0] == 'm' or s[0] == 'w':
		print(0)
	else:
		print(dp[1] % 1000000007)


s = input()
mod = 1000000007
if s.count('m') > 0 or s.count('w') > 0:
	print(0)
else:
	n = len(s)
	result = [0] * (n + 1)
	(result[0], result[1]) = (1, 1)
	for i in range(2, n + 1):
		result[i] = result[i - 1]
		if s[i - 1] == s[i - 2] and (s[i - 1] == 'u' or s[i - 1] == 'n'):
			result[i] = (result[i] + result[i - 2]) % mod
	print(result[n])


mod = 10 ** 9 + 7
v = [1, 1]
s = input()
if 'w' in s or 'm' in s:
	print(0)
	exit()
length = len(s)
(u, n) = ([], [])
for i in range(1, length):
	if (s[i] == 'u' or s[i] == 'n') and s[i] == s[i - 1]:
		v.append((v[-1] + v[-2]) % mod)
	else:
		v.append(v[-1])
print(v[-1])


s = input()
s = '0' + s + '00'
n = len(s)
dupa = []
count = 1
for i in range(1, n):
	if s[i] != 'u' and s[i] != 'n':
		count = 1
		continue
	elif s[i] == s[i - 1]:
		count += 1
		if s[i + 1] != s[i]:
			dupa.append(count)
	else:
		count = 1
wyn = 1
fib = [0] * 100001
fib[0] = 1
fib[1] = 1

def fib(n):
	p = 0
	l = 1
	i = 1
	while i < n + 1:
		pp = l
		l = p + l
		p = pp
		i += 1
	return l
if s.count('m') + s.count('w') > 0:
	print(0)
else:
	for i in dupa:
		wyn = wyn * fib(i) % (10 ** 9 + 7)
	print(wyn)


from math import *
from collections import *
N = 100000
mod = int(1000000000.0 + 7)
dp = [0 for i in range(N)]
dp[1] = 1
dp[2] = 2
for i in range(3, N):
	dp[i] = (dp[i - 1] % mod + dp[i - 2] % mod) % mod
s = input()
if s.find('m') != -1 or s.find('w') != -1:
	print(0)
else:
	ans = 1
	n = len(s)
	i = 0
	while i < n:
		ct = 0
		if s[i] == 'n':
			while i < n and s[i] == 'n':
				i += 1
				ct += 1
			ans = ans % mod * (dp[ct] % mod) % mod
		elif s[i] == 'u':
			while i < n and s[i] == 'u':
				i += 1
				ct += 1
			ans = ans % mod * (dp[ct] % mod) % mod
		else:
			i += 1
	print(int(ans % mod))


s = input()
c = 1
n1 = 0
n2 = 1
u1 = 0
u2 = 1
for i in s:
	if i == 'm' or i == 'w':
		print(0)
		exit()
	elif i == 'n':
		c *= u2
		u1 = 0
		u2 = 1
		(n2, n1) = (n1 + n2, n2)
	elif i == 'u':
		c *= n2
		n1 = 0
		n2 = 1
		(u2, u1) = (u1 + u2, u2)
	else:
		c *= n2
		n1 = 0
		n2 = 1
		c *= u2
		u1 = 0
		u2 = 1
c *= n2
c *= u2
print(c % (10 ** 9 + 7))


from itertools import groupby
from functools import lru_cache

@lru_cache(maxsize=None)
def fib(n):
	if n < 3:
		return n
	a = 1
	b = 2
	for i in range(n - 2):
		(a, b) = (b, a + b)
	return b

def fromStrings(s):
	ctr = 1
	modulo = 10 ** 9 + 7
	for (k, g) in groupby(s):
		if k == 'm' or k == 'w':
			return 0
		if k == 'n' or k == 'u':
			l = len(list(g))
			if l > 1:
				ctr *= fib(l)
				ctr %= modulo
	return ctr
s = input()
print(fromStrings(s))


val = 10 ** 9 + 7
s = input()
arr = [1, 1, 2, 3]
for i in range(10 ** 5):
	arr.append((arr[-1] + arr[-2]) % val)
arr1 = []
count = 1
length = len(s)
for i in range(len(s) - 1):
	if s[i] == s[i + 1] == 'u' or s[i] == s[i + 1] == 'n':
		count += 1
	else:
		arr1.append(count)
		count = 1
arr1.append(count)
arr2 = [arr[i] for i in arr1]
prod = 1
for i in range(len(arr2)):
	prod = prod * arr2[i] % val
for i in s:
	if i == 'm' or i == 'w':
		prod = 0
		break
print(prod)


import re
dp = [0] * (10 ** 5 + 1)
dp[1] = 1
dp[2] = 2
mod = 10 ** 9 + 7
for i in range(3, 10 ** 5 + 1):
	dp[i] = (dp[i - 1] + dp[i - 2]) % mod
st = input()
if 'm' in st or 'w' in st:
	print(0)
else:
	n = re.findall('[n]+', st)
	u = re.findall('[u]+', st)
	mul = 1
	for i in n:
		mul = mul * dp[len(i)] % mod
	for i in u:
		mul = mul * dp[len(i)] % mod
	print(mul)


s = input()
if 'm' in s or 'w' in s:
	print(0)
	exit(0)
mod = 10 ** 9 + 7
res = 0
prev2 = 1
prev = 1
for i in range(1, len(s)):
	if s[i - 1:i + 1] in ['uu', 'nn']:
		(prev2, prev) = (prev, (prev2 + prev) % mod)
	else:
		(prev2, prev) = (prev, prev)
print(prev)


s = input()
p = ''
q = 0
r = []
for c in s:
	if c == 'w' or c == 'm':
		q = 0
		r = [-1]
		break
	elif c in ('u', 'n'):
		if c == p:
			q += 1
		else:
			if q != 0:
				r.append(q)
			q = 1
	else:
		if q != 0:
			r.append(q)
		q = 0
	p = c
if q != 0:
	r.append(q)
if len(r) == 0:
	print(1)
elif r[-1] == -1:
	print(0)
else:
	r.sort(reverse=True)
	t = 1
	(a, b) = (0, 1)
	i = 0
	while len(r) > 0:
		x = r.pop()
		while i < x:
			i += 1
			(a, b) = (b, a + b)
		t *= b
	print(t % (10 ** 9 + 7))


MOD = 1000000007
s = input()
flag = 0
for i in range(0, len(s)):
	if s[i] == 'w' or s[i] == 'm':
		flag = 1
		break
if flag == 0:
	c = 1
	g = []
	for i in range(1, len(s)):
		if s[i] == s[i - 1]:
			c = (c + 1) % MOD
		else:
			if s[i - 1] == 'n' or s[i - 1] == 'u':
				g.append(c)
			c = 1
	if s[-1] == 'n' or s[-1] == 'u':
		g.append(c)
	dp = [1, 1, 2, 3]
	for i in range(100001):
		dp.append((dp[-1] + dp[-2]) % MOD)
	ans = 1
	for i in range(0, len(g)):
		ans = ans * dp[g[i] % MOD] % MOD % MOD
	print(ans % MOD)
else:
	print(0)


MOD = 10 ** 9 + 7
s = input().lower()
dp = [1] * (len(s) + 1)
for i in range(1, len(s)):
	if s[i] == 'n' and s[i - 1] == 'n' or (s[i] == 'u' and s[i - 1] == 'u'):
		dp[i + 1] = (dp[i] + dp[i - 1]) % MOD
	elif s[i] == 'm' or s[i] == 'w':
		dp[i] = dp[i + 1] = 0
	else:
		dp[i + 1] = dp[i]
print(dp[-1] if s[0] != 'm' and s[0] != 'w' else 0)


st = input()
w = st.find('w')
m = st.find('m')
dp = [0 for i in range(len(st) + 1)]
dp[0] = 1
dp[1] = 1
mod = 10 ** 9 + 7
for i in range(2, len(st) + 1):
	dp[i] = dp[i - 1]
	if st[i - 1] == st[i - 2] and (st[i - 1] == 'u' or st[i - 1] == 'n'):
		dp[i] = (dp[i] + dp[i - 2]) % mod
if len(st) == 0 or w != -1 or m != -1:
	print(0)
else:
	output = dp.pop()
	print(output)


def fib(n):
	if n == 1:
		return 1
	curr1 = 0
	curr2 = 1
	for i in range(2, n + 1):
		curr3 = curr1 + curr2
		temp = curr2
		curr2 = curr3
		curr1 = temp
	return curr3
MOD = 10 ** 9 + 7
s = input()
n = len(s)
i = 0
cnt = []
while i < n:
	if s[i] == 'm' or s[i] == 'w':
		print(0)
		exit()
	elif s[i] == 'n':
		c = 0
		while i < n and s[i] == 'n':
			c += 1
			i += 1
		cnt.append(c)
	elif s[i] == 'u':
		c = 0
		while i < n and s[i] == 'u':
			c += 1
			i += 1
		cnt.append(c)
	else:
		i += 1
ans = 1
for i in cnt:
	ans *= fib(i + 1)
print(ans % MOD)


import sys

def fib(n):
	(a, b) = (1, 1)
	for i in range(n - 1):
		(a, b) = (b, (a + b) % (10 ** 9 + 7))
	return b
s = input()
n = len(s)
res = 1
i = 0
while i < n:
	if s[i] == 'u':
		cnt = 1
		k = 1
		while i + k < n and s[i + k] == 'u':
			cnt += 1
			k += 1
		res = res * fib(cnt) % (10 ** 9 + 7)
		i = i + k - 1
	if s[i] == 'n':
		cnt = 1
		k = 1
		while i + k < n and s[i + k] == 'n':
			cnt += 1
			k += 1
		res = res * fib(cnt) % (10 ** 9 + 7)
		i = i + k - 1
	if s[i] == 'm' or s[i] == 'w':
		print(0)
		quit()
	i += 1
print(res)


letters = input()
val = 10 ** 9 + 7
n = len(letters)
if 'm' in letters or 'w' in letters:
	second = 0
else:
	first = 1
	second = 1
	for i in range(1, n):
		if letters[i] == letters[i - 1] and (letters[i - 1] == 'u' or letters[i - 1] == 'n'):
			(first, second) = (second, (first + second) % val)
		else:
			first = second
print(second)


pos = [0, 1, 2]
while len(pos) < 100001:
	a = pos[-1] + pos[-2]
	a %= 1000000007
	pos.append(a)

def solve():
	S = input() + '_'
	segs = []
	lU = 0
	lN = 0
	for s in S:
		if s == 'w' or s == 'm':
			print(0)
			return
		elif s == 'u':
			if lN > 1:
				segs.append(lN)
			lN = 0
			lU += 1
		elif s == 'n':
			if lU > 1:
				segs.append(lU)
			lU = 0
			lN += 1
		else:
			if lU > 1:
				segs.append(lU)
			if lN > 1:
				segs.append(lN)
			lU = 0
			lN = 0
	ans = 1
	for s in segs:
		ans *= pos[s]
		ans %= 1000000007
	print(ans)
solve()


s = input()
zv = 10 ** 9 + 7
f = [1, 1]
for i in range(2, 10 ** 5):
	f.append((f[i - 1] + f[i - 2]) % zv)
u_trva = False
ucka = []
akt_ucok = 0
n_trva = False
nka = []
akt_niek = 0
out = 1
for i in range(len(s)):
	if s[i] == 'm' or s[i] == 'w':
		out = 0
	if s[i] == 'u' and (not u_trva):
		akt_ucok = 1
		u_trva = True
	elif s[i] == 'u' and u_trva:
		akt_ucok += 1
	elif s[i] != 'u' and u_trva:
		ucka.append(akt_ucok)
		u_trva = False
	if s[i] == 'n' and (not n_trva):
		akt_niek = 1
		n_trva = True
	elif s[i] == 'n' and n_trva:
		akt_niek += 1
	elif s[i] != 'n' and n_trva:
		nka.append(akt_niek)
		n_trva = False
if u_trva:
	ucka.append(akt_ucok)
if n_trva:
	nka.append(akt_niek)
for x in ucka:
	out = out * f[x] % zv
for x in nka:
	out = out * f[x] % zv
print(out)


s = input()
n = len(s)
a = [1, 1]
for i in range(2, n + 1):
	a.append(a[i - 2] + a[i - 1])
	a[i] %= 1000000007
s += 'a'
tot = 1
curn = 0
curu = 0
ul = []
nl = []
for i in range(n + 1):
	if s[i] == 'm' or s[i] == 'w':
		tot = 0
	if s[i] == 'n':
		curn += 1
		ul.append(curu)
		curu = 0
	elif s[i] == 'u':
		curu += 1
		nl.append(curn)
		curn = 0
	else:
		nl.append(curn)
		ul.append(curu)
		curn = 0
		curu = 0
for i in range(len(nl)):
	tot *= a[nl[i]]
	tot %= 1000000007
for i in range(len(ul)):
	tot *= a[ul[i]]
	tot %= 1000000007
print(tot)


mod = 10 ** 9 + 7
s = input()
n = len(s)
ans = 1
flag = False
for i in range(n):
	if s[i] == 'w' or s[i] == 'm':
		flag = True
if flag:
	print(0)
else:
	count = 0
	if s[0] == 'u' or s[0] == 'n':
		count += 1
	for i in range(1, n):
		if s[i] == s[i - 1] and (s[i] == 'u' or s[i] == 'n'):
			count += 1
		else:
			ans1 = 1
			ans2 = 1
			for j in range(count - 1):
				(ans1, ans2) = ((ans1 + ans2) % mod, ans1)
			count = 0
			ans = ans1 * ans % mod
			if s[i] == 'u' or s[i] == 'n':
				count += 1
	if count != 0:
		ans1 = 1
		ans2 = 1
		for j in range(count - 1):
			(ans1, ans2) = ((ans1 + ans2) % mod, ans1)
		count = 0
		ans = ans1 * ans % mod
	print(ans % mod)


(f, d) = ([1, 1], input())
for i in range(100000):
	f.append((f[-1] + f[-2]) % 1000000007)
if 'w' in d or 'm' in d:
	print(0)
	exit()
(l, c, r) = (d[0], 1, 1)
for i in d[1:] + 'fnf':
	if l == 'n':
		if i == 'n':
			c += 1
		else:
			r = r * f[c] % 1000000007
			c = 1
	elif l == 'u':
		if i == 'u':
			c += 1
		else:
			r = r * f[c] % 1000000007
			c = 1
	l = i
print(r)


s = input()
n = len(s)
dp = [0 for i in range(n)]
dp[0] = 1
bo = 1
if s[0] == 'm' or s[0] == 'w':
	bo = 0
for i in range(1, n):
	if s[i] == 'm' or s[i] == 'w':
		bo = 0
		break
	if i >= 2 and s[i] == 'u' and (s[i - 1] == 'u'):
		dp[i] = dp[i - 1] + dp[i - 2]
	elif i >= 2 and s[i] == 'n' and (s[i - 1] == 'n'):
		dp[i] = dp[i - 1] + dp[i - 2]
	elif s[i] == 'u' and s[i - 1] == 'u':
		dp[i] = 2
	elif s[i] == 'n' and s[i - 1] == 'n':
		dp[i] = 2
	else:
		dp[i] = dp[i - 1]
	dp[i] %= 1000000007
if bo:
	print(dp[-1])
else:
	print(0)


def solve(S):
	if 'm' in S or 'w' in S:
		return 0
	N = len(S)
	last_val = 1
	last_last_val = 1
	for i in range(N - 2, -1, -1):
		curr_val = last_val
		if i + 1 < N:
			if S[i] == 'u' and S[i + 1] == 'u':
				curr_val += last_last_val
			elif S[i] == 'n' and S[i + 1] == 'n':
				curr_val += last_last_val
		last_last_val = last_val
		last_val = curr_val
	return last_val % (10 ** 9 + 7)
S = input()
print(solve(S))


import sys
M = int(1000000000.0) + 7

def I():
	return sys.stdin.readline().rstrip()
s = I()
if 'w' in s or 'm' in s:
	print(0)
else:
	f = [1, 1]
	for i in range(len(s)):
		f.append((f[-1] + f[-2]) % M)
	sm = []
	last = 'k'
	for c in s:
		if c in 'un':
			if last != c:
				sm.append(1)
			else:
				sm[-1] += 1
		last = c
	ans = 1
	for i in sm:
		ans *= f[i]
		ans %= M
	print(ans)


s = input()
if 'm' in s or 'w' in s:
	print(0)
else:
	a = 1
	b = 1
	c = 1
	for i in range(2, len(s) + 1):
		c = b
		if s[i - 1] == s[i - 2] and (s[i - 1] == 'u' or s[i - 1] == 'n'):
			c = b + a
		a = b
		b = c
	print(c % (10 ** 9 + 7))


mod = 10 ** 9 + 7
s = input()
n = len(s)
dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 1
for i in range(2, n + 1):
	dp[i] += dp[i - 1]
	dp[i] %= mod
	if s[i - 2:i] == 'uu' or s[i - 2:i] == 'nn':
		dp[i] += dp[i - 2]
		dp[i] %= mod
if 'w' in s or 'm' in s:
	print(0)
else:
	print(dp[n])


import sys
input = sys.stdin.readline
mod = 1000000000.0 + 7
s = list(input())
n = len(s)
if 'w' in s or 'm' in s:
	print(0)
	exit()
dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 1
for i in range(2, n + 1):
	dp[i] = dp[i - 1]
	if s[i - 1] == s[i - 2] and (s[i - 1] == 'u' or s[i - 1] == 'n'):
		dp[i] = (dp[i - 1] % mod + dp[i - 2] % mod) % mod
print(int(dp[n]))


def f(n):
	if n <= 1:
		return 1
	if n == 2:
		return 2
	x = 1
	y = 2
	for i in range(n - 2):
		z = x + y
		x = y
		y = z
	return z
s = 1
nbu = 0
nbn = 0
ch = input()
for i in ch:
	if i == 'u':
		nbu += 1
		s *= f(nbn)
		nbn = 0
	elif i == 'n':
		nbn += 1
		s *= f(nbu)
		nbu = 0
	else:
		s *= f(nbu) * f(nbn)
		nbu = 0
		nbn = 0
s *= f(nbu) * f(nbn)
if 'm' in ch or 'w' in ch:
	s = 0
print(s % (10 ** 9 + 7))


s = [*input()]
if s.count('m') or s.count('w'):
	print(0)
	exit()
l = len(s)
M = int(1000000000.0 + 7)
(w, m) = ([], [])
u = n = 0
for i in range(l):
	if u:
		if s[i] == 'u':
			u += 1
		else:
			w.append(u)
			u = 0
	if n:
		if s[i] == 'n':
			n += 1
		else:
			m.append(n)
			n = 0
	if u == 0 and s[i] == 'u':
		u = 1
	if n == 0 and s[i] == 'n':
		n = 1
if u:
	w.append(u)
if n:
	m.append(n)
fib = [1, 1]
for i in range(int(1000000.0)):
	fib.append((fib[-1] + fib[-2]) % M)
ans = 1
for i in w:
	ans = ans * fib[i] % M
for i in m:
	ans = ans * fib[i] % M
print(ans)


import sys
import math

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()
for t in range(1):
	string = list(input())
	string.insert(0, '1')
	dp = [0] * len(string)
	dp[0] = 1
	dp[1] = 1
	mod = 10 ** 9 + 7
	if 'm' in string or 'w' in string:
		print(0)
		continue
	for i in range(2, len(string)):
		if string[i] == 'u' and string[i - 1] == 'u' or (string[i] == 'n' and string[i - 1] == 'n'):
			dp[i] = (dp[i - 1] + dp[i - 2]) % mod
		else:
			dp[i] = dp[i - 1]
	print(dp[-1])


import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
MOD = 1000000007
s = input()
n = len(s)
dp = [[1, 0] for _ in range(n + 2)]
for i in range(2, n + 1):
	dp[i][0] = (dp[i - 1][0] + dp[i - 1][1]) % MOD
	dp[i][1] = dp[i - 1][0] % MOD
ans = 1
i = 1
temp = 1
while i < n:
	if s[i] == 'm' or s[i] == 'w':
		ans = 0
	if s[i] == 'u' and s[i - 1] == 'u':
		temp += 1
	elif s[i] == 'n' and s[i - 1] == 'n':
		temp += 1
	else:
		ans *= (dp[temp][0] + dp[temp][1]) % MOD
		temp = 1
	i += 1
ans *= (dp[temp][0] + dp[temp][1]) % MOD
if s[0] == 'm' or s[0] == 'w':
	ans *= 0
print(ans % MOD)


a = input()
br = True
for i in a:
	if i == 'w' or i == 'm':
		print(0)
		br = False
		break
if br:
	mod = 10 ** 9 + 7
	n = len(a)
	hk = [0] * (n + 1)
	hk[0] = 1
	hk[1] = 1
	for i in range(2, n + 1):
		hk[i] = hk[i - 1]
		if a[i - 1] == a[i - 2] and (a[i - 1] == 'u' or a[i - 1] == 'n'):
			hk[i] += hk[i - 2]
			hk[i] %= mod
	print(hk[n])


mod = 10 ** 9 + 7
l = [1]
s = input()
flag = 0
if s[0] == 'w' or s[0] == 'm':
	print(0)
else:
	nlen = 0
	ulen = 0
	if s[0] == 'n':
		nlen += 1
	elif s[0] == 'u':
		ulen += 1
	for i in range(1, len(s)):
		if s[i] == 'w' or s[i] == 'm':
			flag = 1
			break
		elif s[i] == s[i - 1] and s[i] == 'n':
			nlen += 1
		elif s[i] == s[i - 1] and s[i] == 'u':
			ulen += 1
		elif s[i] == 'n':
			nlen += 1
			if ulen != 0:
				l.append(ulen)
				ulen = 0
		elif s[i] == 'u':
			ulen += 1
			if nlen != 0:
				l.append(nlen)
				nlen = 0
		elif nlen != 0:
			l.append(nlen)
			nlen = 0
		elif ulen != 0:
			l.append(ulen)
			ulen = 0
	if nlen != 0:
		l.append(nlen)
		nlen = 0
	elif ulen != 0:
		l.append(ulen)
		ulen = 0
	if flag:
		print(0)
	else:
		mm = max(l)
		fib = [1, 1, 2]
		for i in range(3, mm + 1):
			fib.append((fib[i - 1] + fib[i - 2]) % mod)
		ans = 1
		for item in l:
			ans = ans * fib[item] % mod
		print(ans)


init = input()
fibo = [1, 1]
for i in range(0, 100000):
	fibo.append((fibo[-1] + fibo[-2]) % 1000000007)
total = 1
count = 1
if init[0] == 'm' or init[0] == 'w':
	total = 0
for i in range(1, len(init)):
	if init[i] == init[i - 1] and (init[i] == 'u' or init[i] == 'n'):
		count = count + 1
	elif init[i] == 'm' or init[i] == 'w':
		total = 0
	else:
		total = total * fibo[count] % 1000000007
		count = 1
total = total * fibo[count] % 1000000007
print(total)


fib = [0] * 100001
m = 10 ** 9 + 7

def f(n):
	fib[0] = 1
	fib[1] = 1
	for i in range(2, n + 1):
		fib[i] = (fib[i - 1] % m + fib[i - 2] % m) % m
	return fib[n]
s = input()
n = len(s)
ans = 1
flag = 0
i = 0
while i < n:
	if s[i] == 'm' or s[i] == 'w':
		print(0)
		flag = 1
		break
	elif s[i] == 'u' or s[i] == 'n':
		c = 1
		j = i + 1
		while j < n and s[j] == s[i]:
			c = c + 1
			j = j + 1
		ans = ans % m * (f(c) % m) % m
		i = j
	else:
		i = i + 1
if flag == 0:
	print(ans)


def Mod():
	return 1000000007

def solution():
	n = str(input())
	bad = n.count('m')
	bad += n.count('w')
	if bad == 0:
		dp = [1] * (len(n) + 1)
		for i in range(2, len(n) + 1):
			if n[i - 1] == n[i - 2] and (n[i - 1] == 'u' or n[i - 1] == 'n'):
				dp[i] = (dp[i - 1] + dp[i - 2]) % Mod()
			else:
				dp[i] = dp[i - 1]
		print(dp[len(n)])
	else:
		print(0)
solution()


from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
mod = 10 ** 9 + 7
eps = 10 ** (-7)

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))

def inpl_str():
	return list(sys.stdin.readline().split())
S = input()
L = len(S)
N = 10 ** 5 + 5
dp = [0] * N
dp[1] = 1
dp[2] = 2
for i in range(3, N):
	dp[i] = (dp[i - 1] + dp[i - 2]) % mod
S += 'X'
i = 0
ans = 1
while i < L:
	if S[i] == 'u':
		cnt = 0
		while S[i] == 'u':
			i += 1
			cnt += 1
		ans *= dp[cnt]
	elif S[i] == 'n':
		cnt = 0
		while S[i] == 'n':
			i += 1
			cnt += 1
		ans *= dp[cnt]
	elif S[i] == 'm' or S[i] == 'w':
		print(0)
		sys.exit()
	else:
		i += 1
	ans %= mod
print(ans % mod)


import bisect
import sys
import math
mod = 10 ** 9 + 7
t = 1
for _ in range(t):
	s = input()
	cw = s.count('w')
	cm = s.count('m')
	if cm or cw:
		print(0)
	else:
		du = []
		dn = []
		n = len(s)
		pref = [0] * max(n + 1, 3)
		pref[1] = 1
		pref[2] = 2
		for i in range(3, n + 1):
			pref[i] = (pref[i - 1] % mod + pref[i - 2] % mod) % mod
		(cu, cn) = (0, 0)
		for i in range(len(s)):
			if s[i] == 'u':
				cu += 1
			else:
				if cu > 0:
					du.append(cu)
				cu = 0
			if s[i] == 'n':
				cn += 1
			else:
				if cn > 0:
					dn.append(cn)
				cn = 0
		if cn > 0:
			dn.append(cn)
		if cu > 0:
			du.append(cu)
		mul = 1
		for i in range(len(du)):
			if du[i] > 1:
				mul = mul % mod * (pref[du[i]] % mod) % mod
		for i in range(len(dn)):
			if dn[i] > 1:
				mul = mul % mod * (pref[dn[i]] % mod) % mod
		print(mul % mod)


MOD = 10 ** 9 + 7
s = input()
n = len(s)
if s.count('m') > 0 or s.count('w') > 0:
	print('0')
	exit()
(us, ns) = ([0], [0])
dp = [1 for i in range(n + 1)]
for i in range(2, n + 1):
	dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
for i in range(n):
	if s[i] == 'u':
		us[-1] += 1
		ns.append(0)
	elif s[i] == 'w':
		us[-1] += 2
		ns.append(0)
	elif s[i] == 'n':
		ns[-1] += 1
		us.append(0)
	elif s[i] == 'm':
		ns[-1] += 2
		us.append(0)
	else:
		us.append(0)
		ns.append(0)
ans = 1
for usi in us:
	ans = ans * dp[usi] % MOD
for nsi in ns:
	ans = ans * dp[nsi] % MOD
print(ans)


import sys
input = sys.stdin.readline
s = list(input()[:-1])
m = pow(10, 9) + 7
if 'm' in s or 'w' in s:
	print(0)
else:
	n = len(s)
	x = [0] * (n + 1)
	s.insert(0, 0)
	for i in range(n + 1):
		if i < 2:
			x[i] = 1
		elif s[i] != s[i - 1]:
			x[i] = x[i - 1]
		elif s[i] in ['u', 'n']:
			x[i] = (x[i - 1] + x[i - 2]) % m
		else:
			x[i] = x[i - 1]
	print(x[n])


x = input()
v = 1000000007

def f(n):
	a = 1
	b = 0
	while n:
		a = (a % v + b % v) % v
		b = (a % v - b % v) % v
		n -= 1
	return a
(n, u, z, t, q) = (0, 0, 1, 0, 1)
for i in range(len(x)):
	if x[i] == 'm' or x[i] == 'w':
		print('0')
		t = 1
		break
	elif x[i] == 'n':
		n += 1
		z = z % v * (f(u) % v) % v
		if i == len(x) - 1:
			z = z % v * (f(n) % v) % v
		u = 0
	elif x[i] == 'u':
		u += 1
		z = z % v * (f(n) % v) % v
		if i == len(x) - 1:
			z = z % v * (f(u) % v) % v
		n = 0
	else:
		z = z % v * (f(u) % v) % v
		z = z % v * (f(n) % v) % v
		u = 0
		n = 0
if t == 0:
	print(z)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def fibonacci(n):
	a = 1
	b = 1
	if n == 0:
		return a
	elif n == 1:
		return b
	else:
		for i in range(2, n):
			c = a + b
			a = b
			b = c
		return b
str1 = input()
setty = set([k for k in str1])
n = len(str1)
if 'm' in setty or 'w' in setty:
	print(0)
else:
	ans = 1
	products = []
	chain = 0
	for s in range(n):
		if str1[s] == 'u':
			chain += 1
		else:
			if chain >= 2:
				products.append(chain)
			chain = 0
	if chain >= 2:
		products.append(chain)
	chain1 = 0
	for s in range(n):
		if str1[s] == 'n':
			chain1 += 1
		else:
			if chain1 >= 2:
				products.append(chain1)
			chain1 = 0
	if chain1 >= 2:
		products.append(chain1)
	for s in range(len(products)):
		ans *= fibonacci(products[s] + 1)
		ans = ans % (10 ** 9 + 7)
	print(ans)


s = input()
k = list(s)
c = 'n'
d = 'u'
mod = 1000000007
fb = []
fb.append(1)
fb.append(1)
for i in range(2, 100000):
	fb.append((fb[i - 1] + fb[i - 2]) % mod)

def fibo(d):
	return fb[d]
if 'm' in k or 'w' in k:
	print(0)
elif 'm' not in k and 'w' not in k and (c not in k) and (d not in k):
	print(1)
else:
	s = s + '#'
	d1 = 1
	an = 1
	for i in range(1, len(s)):
		if s[i] == s[i - 1] and (s[i] == 'n' or s[i] == 'u'):
			d1 = d1 + 1
		else:
			if d1 != 1:
				an = an * fibo(d1) % mod
			d1 = 1
	print(an)


import sys
M = 10 ** 9 + 7
N = 10 ** 5 + 1
F = [0] * N
(F[0], F[1]) = (1, 1)
for n in range(2, N):
	F[n] = (F[n - 1] + F[n - 2]) % M
(strike, count, values) = ('', 0, [])
for char in sys.stdin.readline() + ' ':
	if char in ('w', 'm'):
		sys.stdout.write('0\n')
		exit(0)
	if char == strike:
		count += 1
	else:
		if count > 0:
			if count > 1:
				values.append(count)
			(count, strike) = (0, '')
		if char in ('u', 'n'):
			strike = char
			count = 1
result = 1
for value in values:
	result = result * F[value] % M
sys.stdout.write(str(result) + '\n')


import sys
input = sys.stdin.readline
s = input()
n = len(s) - 1
if s[0] == 'm' or s[0] == 'w':
	print(0)
	exit()
a = b = 1
for i in range(1, n):
	if s[i] == 'm' or s[i] == 'w':
		print(0)
		exit()
	if s[i] == s[i - 1] and (s[i] == 'u' or s[i] == 'n'):
		c = a + b
		(a, b) = (b, c)
	else:
		a = b
print(b % (1000000000 + 7))


s = str(input())
if 'm' in s or 'w' in s:
	print(0)
	exit(0)
n = len(s)
dp = [0 for i in range(n + 1)]
dp[0] = dp[1] = 1
for i in range(2, n + 1):
	dp[i] = dp[i - 1]
	if s[i - 1] == s[i - 2] and (s[i - 1] == 'u' or s[i - 2] == 'n'):
		dp[i] = (dp[i] + dp[i - 2]) % int(1000000000.0 + 7)
print(dp[n])


MOD = int(1000000000.0 + 7)

def f(n):
	if n == 1 or n == 2:
		return n
	(a, b) = (1, 2)
	n -= 2
	while n > 0:
		(a, b) = (b, a + b)
		n -= 1
	return b
assert f(2) == 2
assert f(3) == 3
assert f(4) == 5
assert f(5) == 8
s = input()
ans = 1
u = 0
n = 0
for c in s:
	if c == 'm' or c == 'w':
		ans = 0
		break
	elif c == 'u':
		u += 1
		if n > 1:
			ans *= f(n)
		n = 0
	elif c == 'n':
		n += 1
		if u > 1:
			ans *= f(u)
		u = 0
	else:
		if n > 1:
			ans *= f(n)
		n = 0
		if u > 1:
			ans *= f(u)
		u = 0
	ans = ans % MOD
if n > 1:
	ans *= f(n)
if u > 1:
	ans *= f(u)
print(ans % MOD)


s = input()
MOD = 1000000007

def solve(s):
	if s[0] in ('w', 'm'):
		return 0
	(dp0, dp1, dp2) = (1, 1, 1)
	for i in range(1, len(s)):
		if s[i] in ('w', 'm'):
			return 0
		if s[i] in ('u', 'n') and s[i] == s[i - 1]:
			dp2 = (dp1 + dp0) % MOD
		else:
			dp2 = dp1
		dp0 = dp1
		dp1 = dp2
	return dp2
print(solve(s))


def dp_f(x, M):
	memo = {}

	def f(z):
		if z in memo.keys():
			return memo[z]
		elif z <= 1:
			return 1
		elif z > 1:
			m = (f(z - 2) + f(z - 1)) % M
			memo[z] = m
			return m
	for i in range(x):
		f(i)
	return f(x)
s = input()
n = len(s)
c = 0
d = 0
ans = 1
for i in range(n):
	if s[i] == 'n':
		c += 1
	elif c > 0:
		ans = ans * dp_f(c, 10 ** 9 + 7) % (10 ** 9 + 7)
		c = 0
	if s[i] == 'u':
		d += 1
	elif d > 0:
		ans = ans * dp_f(d, 10 ** 9 + 7) % (10 ** 9 + 7)
		d = 0
if c > 0:
	ans = ans * dp_f(c, 10 ** 9 + 7) % (10 ** 9 + 7)
if d > 0:
	ans = ans * dp_f(d, 10 ** 9 + 7) % (10 ** 9 + 7)
if 'm' in s or 'w' in s:
	ans = 0
print(ans)


q = input()
k = 10 ** 9 + 7
dp = [1, 1] + [0] * 100000 + [1]
if 'm' in q or 'w' in q:
	print(0)
	exit()
for i in range(1, len(q)):
	if q[i] == 'n' and q[i - 1] == 'n':
		dp[i] = (dp[i - 1] + dp[i - 2]) % k
	elif q[i] == 'u' and q[i - 1] == 'u':
		dp[i] = (dp[i - 1] + dp[i - 2]) % k
	else:
		dp[i] = dp[i - 1]
print(dp[len(q) - 1] % k)


import sys, math, statistics as ss, collections as cc
input = sys.stdin.readline
a = list(input())
a.pop()
q = [1]
for (i, j) in enumerate(a):
	if j != 'n' and j != 'u' or not i or a[i - 1] != j:
		q.append(q[-1])
	else:
		q.append((q[-1] + q[-2]) % 1000000007)
qw = q[-1]
if 'm' in a or 'w' in a:
	qw = 0
print(qw)


mod = 10 ** 9 + 7

def count(s, num):
	if s != 'u' and s != 'n':
		return 1
	lst = [1 for i in range(num + 1)]
	for i in range(2, num + 1):
		lst[i] = lst[i - 1] + lst[i - 2]
		lst[i] %= mod
	return lst[-1]
st = input()
ans = 1
howelem = 0
lastelem = st[0]
for i in st:
	if i == 'm' or i == 'w':
		print(0)
		exit()
	if lastelem == i:
		howelem += 1
	else:
		ans *= count(lastelem, howelem)
		lastelem = i
		howelem = 1
		ans %= mod
ans *= count(lastelem, howelem)
ans %= mod
print(ans)


name = input()
nCounter = 0
uCounter = 0
totalCounter = 1
fiboList = [None] * (len(name) + 2)
fiboList[1] = 1
fiboList[2] = 1
for i in range(3, len(name) + 2):
	fiboList[i] = (fiboList[i - 1] + fiboList[i - 2]) % (10 ** 9 + 7)
for i in range(0, len(name)):
	if name[i] == 'm' or name[i] == 'w':
		totalCounter = 0
		break
	elif uCounter == 0 and name[i] == 'n':
		nCounter = nCounter + 1
		i = i + 1
	elif nCounter == 0 and name[i] == 'u':
		uCounter = uCounter + 1
		i = i + 1
	else:
		if nCounter != 0:
			if name[i] == 'u':
				uCounter = uCounter + 1
			totalCounter = totalCounter * fiboList[nCounter + 1]
			nCounter = 0
		elif uCounter != 0:
			if name[i] == 'n':
				nCounter = nCounter + 1
			totalCounter = totalCounter * fiboList[uCounter + 1]
			uCounter = 0
		i = i + 1
if nCounter != 0:
	totalCounter = totalCounter * fiboList[nCounter + 1]
	print(totalCounter % (10 ** 9 + 7))
elif uCounter != 0:
	totalCounter = totalCounter * fiboList[uCounter + 1]
	print(totalCounter % (10 ** 9 + 7))
else:
	print(totalCounter % (10 ** 9 + 7))


import math
m = 10 ** 9 + 7
f = [1]
f.append(1)

def store_fact(n):
	i = 2
	while i <= n:
		num = f[-1] + f[-2]
		f.append(num % m)
		i += 1
s = input()
l1 = []
l2 = []
cur = 0
for i in range(len(s)):
	if s[i] == 'u':
		cur += 1
	else:
		if cur >= 2:
			l1.append(cur)
		cur = 0
if cur >= 2:
	l1.append(cur)
cur = 0
for i in range(len(s)):
	if s[i] == 'n':
		cur += 1
	else:
		if cur >= 2:
			l2.append(cur)
		cur = 0
if cur >= 2:
	l1.append(cur)
flag = True
for i in range(len(s)):
	if s[i] == 'w' or s[i] == 'm':
		flag = False
		break
if not flag:
	print(0)
else:
	ans = 1
	ma = -1
	for i in l1:
		ma = max(ma, i)
	for i in l2:
		ma = max(ma, i)
	if ma != -1:
		store_fact(ma)
	for i in l1:
		ans = ans % m * (f[i] % m) % m
	for i in l2:
		ans = ans % m * (f[i] % m) % m
	print(ans)


from collections import defaultdict

def get_ans(s):
	dp = defaultdict(lambda : 1)
	big = 10 ** 9 + 7
	if 'm' in s or 'w' in s:
		return 0
	for i in range(1, len(s)):
		if s[i] == 'm':
			return 0
		if s[i] == 'u' and s[i - 1] == 'u' or (s[i] == 'n' and s[i - 1] == 'n'):
			dp[i] = (dp[i - 2] + dp[i - 1]) % big
		else:
			dp[i] = dp[i - 1]
	return dp[len(s) - 1]
s = input()
ans = get_ans(s)
print(ans)


def rec(n):
	global fib
	return fib[n]
s = input()
fib = []
fib.append(1)
fib.append(1)
for i in range(len(s)):
	fib.append((fib[-1] + fib[-2]) % 1000000007)
ci = 1
cc = ' '
c = 0
ans = 1
for i in s:
	if i != cc:
		if cc == 'u':
			ans = ans * rec(c) % 1000000007
		elif cc == 'n':
			ans = ans * rec(c) % 1000000007
		elif cc == 'w':
			print(0)
			exit(0)
		elif cc == 'm':
			print(0)
			exit(0)
		cc = i
		c = 1
	else:
		c += 1
if cc == 'u':
	ans = ans * rec(c) % 1000000007
elif cc == 'n':
	ans = ans * rec(c) % 1000000007
elif cc == 'w':
	print(0)
	exit(0)
elif cc == 'm':
	print(0)
	exit(0)
print(ans)


import operator as op
import re
from functools import reduce, lru_cache

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

@lru_cache(maxsize=None)
def w(n):
	if n < 5:
		return sum((ncr(n - i, i) for i in range(n // 2 + 1)))
	a = n // 2
	b = n - a
	return (w(a) * w(b) + w(a - 1) * w(b - 1)) % 1000000007
s = input().strip()
if 'm' in s or 'w' in s:
	print(0)
else:
	s = [w(len(l)) for l in re.findall('u+|n+', s)]
	print(reduce(op.mul, s, 1) % 1000000007)


from sys import exit
s = input()
(a, b) = (1, 1)
ans = 1
MOD = 10 ** 9 + 7
dp = [0 for i in range(len(s) + 1)]
dp[0] = 1
dp[1] = 2
for i in range(2, len(s)):
	dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
if s[0] in ['w', 'm']:
	print(0)
	exit(0)
for i in range(1, len(s)):
	if s[i] in ['w', 'm']:
		print(0)
		exit(0)
	if s[i] == s[i - 1] == 'u':
		a += 1
	elif s[i] == s[i - 1] == 'n':
		b += 1
	else:
		if a > 1:
			ans *= dp[a - 1]
			ans %= MOD
			a = 1
		if b > 1:
			ans *= dp[b - 1]
			ans %= MOD
			b = 1
if a > 1:
	ans *= dp[a - 1]
	ans %= MOD
if b > 1:
	ans *= dp[b - 1]
	ans %= MOD
print(ans % MOD)


arr = [1, 1]
M = 10 ** 9 + 7
for i in range(10 ** 5):
	arr.append((arr[-1] + arr[-2]) % M)

def f(symb):
	nonlocal s, arr
	local_ans = 1
	if s[0] == symb:
		cnt = 1
	else:
		cnt = 0
	for i in range(1, len(s)):
		if s[i] != s[i - 1]:
			if cnt > 0:
				local_ans *= arr[cnt]
				local_ans %= M
			if cnt == 0 and s[i] == symb:
				cnt = 1
			if s[i] != symb:
				cnt = 0
		if s[i] == s[i - 1] and s[i] == symb:
			cnt += 1
	if cnt > 0:
		local_ans *= arr[cnt]
		local_ans %= M
	return local_ans
ans = 1
s = input()
if s.count('w') or s.count('m'):
	print(0)
else:
	print(f('u') * f('n') % M)


table = [1, 1, 2, 3, 5]
for i in range(5, 100000):
	table.append((table[i - 1] + table[i - 2]) % 1000000007)
s = input()
cnt = 1
tmp = 'x'
tcnt = 0
for i in range(len(s)):
	if s[i] == 'm' or s[i] == 'w':
		cnt = 0
		break
	if (s[i] == 'n' or s[i] == 'u') and tmp == s[i]:
		tcnt = tcnt + 1
	else:
		cnt = cnt * table[tcnt] % 1000000007
		tcnt = 1
		tmp = s[i]
print(cnt * table[tcnt] % 1000000007)


import sys
input = sys.stdin.readline
s = input()
fibo = [1, 1]
counter = 1
dp = [1, 0]
for i in range(1, len(s)):
	if s[i] == 'm' or s[i] == 'w' or s[0] == 'm' or (s[0] == 'w'):
		print(0)
		exit()
	elif s[i - 1] == s[i] and (s[i] == 'u' or s[i] == 'n'):
		counter += 1
		fibo.append((fibo[counter - 1] + fibo[counter - 2]) % 1000000007)
	else:
		dp[1] = fibo[-1]
		dp[0] = dp[0] * dp[1] % 1000000007
		dp[1] = 0
		fibo = [1, 1]
		counter = 1
print(dp[0])


MOD = 10 ** 9 + 7

def foo(n):
	a = 0
	b = 1
	c = 1
	for _ in range(n):
		c = (a + b) % MOD
		a = b
		b = c
	return c
a = input().strip()
if 'm' in a or 'w' in a:
	print(0)
	import sys
	sys.exit(0)
w = 1
i = 0
n = len(a)
while i < n:
	count = 1
	while i + 1 < n and a[i] == a[i + 1] and (a[i] in ['u', 'n']):
		count += 1
		i += 1
	i += 1
	w = w * foo(count) % MOD
print(w)


c = 1000000000 + 7
fibs = [1, 1]
while len(fibs) < 100001:
	fibs.append((fibs[len(fibs) - 1] + fibs[len(fibs) - 2]) % c)
line = input()
res = 0
start = -1
end = -1
current = '#'
for i in range(0, len(line)):
	if line[i] == 'w' or line[i] == 'm':
		print(0)
		exit(0)
	if line[i] == current:
		end = i
	elif current != '#':
		current = '#'
		length = end - start + 1
		if res == 0:
			res = fibs[length] % c
		else:
			res = res * fibs[length] % c
		start = -1
		end = -1
	if line[i] == 'n' and current == '#':
		current = 'n'
		start = i
		end = i
	elif line[i] == 'u' and current == '#':
		current = 'u'
		start = i
		end = i
if current != '#':
	length = end - start + 1
	if res == 0:
		res = fibs[length] % c
	else:
		res = res * fibs[length] % c
if res == 0:
	print(1)
else:
	print(res)


mod = int(1000000000.0 + 7)
s = input()
if 'w' in s or 'm' in s:
	print(0)
	exit()
arr = []
flag = 0
for i in range(1, len(s)):
	if s[i] == 'u' and s[i - 1] == 'u':
		if flag == 0:
			arr.append(2)
			flag = 1
		else:
			arr[-1] += 1
	elif s[i] == 'n' and s[i - 1] == 'n':
		if flag == 0:
			arr.append(2)
			flag = 1
		else:
			arr[-1] += 1
	else:
		flag = 0
fib = [1, 1]
for i in range(100000):
	fib.append((fib[-1] + fib[-2]) % mod)
ans = 1
for i in range(len(arr)):
	ans = ans * fib[arr[i]] % mod
print(ans)


f = [1, 2]
const = 10 ** 9 + 1
s = input()
if 'm' in s or 'w' in s:
	print(0)
else:
	ans = 1
	const = 10 ** 9 + 7
	check = False
	count = 0
	if s[0] == 'u' or s[0] == 'n':
		check = True
		count = 1
	for i in range(1, len(s)):
		f.append((f[-1] + f[-2]) % const)
		if s[i] == s[i - 1]:
			count += 1
		elif check:
			ans = ans * f[count - 1] % const
			count = 0
			check = False
			if s[i] == 'u':
				count = 1
				check = 'u'
			elif s[i] == 'n':
				count = 1
				check = 'n'
			else:
				check = False
				count = 0
		elif s[i] == 'u':
			count = 1
			check = 'u'
		elif s[i] == 'n':
			count = 1
			check = 'n'
		else:
			check = False
			count = 0
	if check:
		ans = ans * f[count - 1] % const
	print(ans)


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from collections import defaultdict as dd
s = input() + '@'
n = len(s)
p = 1
ans = 1
fib = [0] * 100005
fib[1] = 1
fib[2] = 2
f = 1
for i in range(3, 100005):
	fib[i] = (fib[i - 1] + fib[i - 2]) % MOD
for i in range(1, n):
	if s[i] == s[i - 1]:
		p += 1
		continue
	if p > 1:
		f = 0
	if s[i - 1] == 'n' or s[i - 1] == 'u':
		ans *= fib[p]
		ans %= MOD
	p = 1
if 'm' in s or 'w' in s:
	ans *= 0
print(ans % MOD)


fib = [0, 1, 2]
mod = 1000000007
for j in range(3, 100001):
	fib.append((fib[j - 1] + fib[j - 2]) % mod)
l = list(input())
count = 1
tot = 1
for j in range(1, len(l) + 1):
	if j < len(l) and (l[j - 1] == l[j] == 'u' or l[j - 1] == l[j] == 'n'):
		count += 1
	elif l[j - 1] == 'u' or l[j - 1] == 'n':
		tot = tot * fib[count] % mod
		count = 1
if 'm' in l or 'w' in l:
	print(0)
else:
	print(tot % mod)


str = input()
str = str + 'a'
ln = len(str)
ft = [1, 1, 2]
M = 1000000007
i = 2
while i <= ln:
	f = ft[i] + ft[i - 1]
	f %= M
	ft.append(f)
	i += 1
cn = 0
t = 'n'
a = 1
for c in str:
	if c == t:
		cn += 1
	elif cn > 0:
		a *= ft[cn]
		a %= M
		cn = 0
cn = 0
t = 'u'
for c in str:
	if c == t:
		cn += 1
	elif cn > 0:
		a *= ft[cn]
		a %= M
		cn = 0
if str.find('m') != -1:
	a = 0
if str.find('w') != -1:
	a = 0
print(a)


s = input()
if 'w' in s or 'm' in s:
	print(0)
	exit()
i = 2
cnt = 0
dp = [0] * (len(s) + 1)
dp[0] = 1
dp[1] = 1
while i <= len(s):
	dp[i] = dp[i - 1]
	if s[i - 1] == s[i - 2] == 'u' or s[i - 1] == s[i - 2] == 'n':
		dp[i] = (dp[i - 1] + dp[i - 2]) % (10 ** 9 + 7)
	i += 1
print(dp[-1])


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase

def main():
	dp = [0, 1, 2]
	l = input()
	for i in range(3, len(l) + 1):
		temp = (dp[-1] % P + dp[-2] % P) % P
		dp.append(temp)
	ans = 1
	count = 1
	last = -1
	flag = 0
	for i in range(len(l)):
		if l[i] == 'm' or l[i] == 'w':
			flag = 1
			break
		if l[i] == last:
			count += 1
		elif last == 'n' or last == 'u':
			ans = ans % P * dp[count] % P % P
			count = 1
			last = l[i]
		else:
			count = 1
			last = l[i]
	if count:
		if last == 'n' or last == 'u':
			ans = ans % P * dp[count] % P % P
	if flag:
		print(0)
	else:
		print(ans)
BUFSIZE = 8192
P = 1000000007

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


mod = int(1000000000.0 + 7)
s = input()
dp = []
n = len(s)
for i in range(n + 1):
	dp.append(0)
dp[0] = 1
flag = False
if s[0] == 'w' or s[0] == 'm':
	flag = True
for i in range(n):
	if i == 0:
		continue
	dp[i] = dp[i - 1]
	if s[i] == 'w' or s[i] == 'm':
		flag = True
	if s[i] == 'u' and s[i - 1] == 'u':
		if i == 1:
			dp[i] = (dp[i] + 1) % mod
		else:
			dp[i] = (dp[i] + dp[i - 2]) % mod
	if s[i] == 'n' and s[i - 1] == 'n':
		if i == 1:
			dp[i] = (dp[i] + 1) % mod
		else:
			dp[i] = (dp[i] + dp[i - 2]) % mod
if flag == True:
	print(0)
else:
	print(dp[n - 1])


def solve(s):
	if 'm' in s or 'w' in s:
		return 0
	count = 1
	i = 0
	while i < len(s):
		if s[i] in 'nu':
			j = 0
			k = 0
			while j + i < len(s) and s[i + j] == s[i]:
				j += 1
				k += 1
			count *= fib(k)
			i += j
		else:
			i += 1
	return count

def fib(num):
	if num == 1:
		return 1
	a = 1
	b = 2
	for i in range(2, num):
		(a, b) = (b, a + b)
	return b
s = input()
print(solve(s) % (10 ** 9 + 7))


def fib(n):
	F = [[1, 1], [1, 0]]
	if n == 0:
		return 0
	power(F, n - 1)
	return F[0][0]

def multiply(F, M):
	x = F[0][0] * M[0][0] + F[0][1] * M[1][0]
	y = F[0][0] * M[0][1] + F[0][1] * M[1][1]
	z = F[1][0] * M[0][0] + F[1][1] * M[1][0]
	w = F[1][0] * M[0][1] + F[1][1] * M[1][1]
	F[0][0] = x
	F[0][1] = y
	F[1][0] = z
	F[1][1] = w

def power(F, n):
	if n == 0 or n == 1:
		return
	M = [[1, 1], [1, 0]]
	power(F, n // 2)
	multiply(F, F)
	if n % 2 != 0:
		multiply(F, M)
s = input()
n = len(s)
p = 1
c = 0
trig = False
for i in range(n):
	if s[i] == 'm' or s[i] == 'w':
		trig = True
for i in range(n - 1):
	if s[i] == 'n' and s[i + 1] == 'n':
		c += 1
	elif s[i] == 'n' and s[i + 1] != 'n':
		c += 1
		p *= fib(c + 1)
		c = 0
if s[-1] == 'n':
	c += 1
	p *= fib(c + 1)
c = 0
for i in range(n - 1):
	if s[i] == 'u' and s[i + 1] == 'u':
		c += 1
	elif s[i] == 'u' and s[i + 1] != 'u':
		c += 1
		p *= fib(c + 1)
		c = 0
if s[-1] == 'u':
	c += 1
	p *= fib(c + 1)
if trig:
	print(0)
else:
	l = 10 ** 9 + 7
	print(p % l)


from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
mod = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10 ** 9)
s = list(input())
if s.count('m') != 0 or s.count('w') != 0:
	print(0)
	exit()
ans = 1
dp = [0] * (10 ** 5 + 1)
dp[0] = 1
dp[1] = 1
for i in range(2, len(dp)):
	dp[i] = dp[i - 1] % mod + dp[i - 2] % mod
	dp[i] %= mod
i = 0
while i < len(s):
	if s[i] == 'u':
		cnt = 0
		while s[i] == 'u':
			cnt += 1
			i += 1
			if i == len(s):
				break
		ans = ans % mod * dp[cnt] % mod
		ans %= mod
	elif s[i] == 'n':
		cnt = 0
		while s[i] == 'n':
			cnt += 1
			i += 1
			if i == len(s):
				break
		ans = ans % mod * dp[cnt] % mod
		ans %= mod
	else:
		i += 1
print(ans % mod)


s = input()
MOD = 10 ** 9 + 7
if 'w' in s or 'm' in s:
	print(0)
	exit()
N = len(s)
dp = [0] * (N + 1)
dp[0] = 1
dp[1] = 1
for i in range(2, N + 1):
	dp[i] = dp[i - 1] + dp[i - 2]
	dp[i] %= MOD
ans = 1
cnt = 1
s += '1'
l = []
for i in range(N):
	if s[i] != s[i + 1]:
		l.append((s[i], cnt))
		cnt = 1
	else:
		cnt += 1
for (alpha, c) in l:
	if alpha == 'u':
		ans *= dp[c]
		ans %= MOD
	if alpha == 'n':
		ans *= dp[c]
		ans %= MOD
print(ans)


import sys

def check(s):
	for i in s:
		if i == 'w' or i == 'm':
			return False
	return True

def ofcal(n):
	a = 1
	b = 1
	if n == 0 or n == 1:
		return 1
	if n == 2:
		return 2
	for g in range(2, n + 1):
		c = a + b
		a = b
		b = c
	return c

def mmul(a, b, m):
	return a % m * (b % m) % m
s = sys.stdin.readline().strip()
mod = pow(10, 9) + 7
if check(s):
	ans = []
	ctr = 0
	for i in range(len(s)):
		if s[i] == 'u':
			ctr += 1
		elif ctr >= 1:
			ans.append(ofcal(ctr))
			ctr = 0
	if ctr >= 1:
		ans.append(ofcal(ctr))
		ctr = 0
	ctr2 = 0
	for j in range(len(s)):
		if s[j] == 'n':
			ctr2 += 1
		elif ctr2 >= 1:
			ans.append(ofcal(ctr2))
			ctr2 = 0
	if ctr2 >= 1:
		ans.append(ofcal(ctr2))
		ctr2 = 0
	fin_ans = 1
	for f in range(len(ans)):
		fin_ans = mmul(fin_ans, ans[f], mod)
	print(fin_ans)
else:
	print(0)


import io, sys, atexit, os
import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations
from itertools import combinations

def li():
	return list(map(int, sys.stdin.readline().split()))

def num():
	return map(int, sys.stdin.readline().split())

def nu():
	return int(input())

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	gg = find_gcd(x, y)
	return x * y // gg
mm = 1000000007

def solve():
	t = 1
	fib = [0] * 100001
	fib[1] = 1
	for i in range(2, 100001):
		fib[i] = (fib[i - 1] + fib[i - 2]) % mm
	for tt in range(t):
		ss = input()
		if ss.count('m') != 0 or ss.count('w'):
			print(0)
			continue
		ans = 1
		x = 0
		for i in range(len(ss)):
			if ss[i] == 'u':
				x += 1
			else:
				ans = ans * fib[x + 1] % mm
				x = 0
		ans = ans * fib[x + 1] % mm
		x = 0
		for i in range(len(ss)):
			if ss[i] == 'n':
				x += 1
			else:
				ans = ans * fib[x + 1] % mm
				x = 0
		ans = ans * fib[x + 1] % mm
		x = 0
		print(ans)
solve()


a = input()
if 'm' in a or 'w' in a:
	print(0)
else:
	n = len(a)
	M = 1000000007
	f = [1] * (n + 1)
	for i in range(2, n + 1):
		f[i] = (f[i - 2] + f[i - 1]) % M
	ans = 1
	i = 0
	while i < n:
		x = a[i]
		if x in 'nu':
			j = i
			while j < n and a[j] == x:
				j += 1
			ans = ans * f[j - i] % M
			i = j
		else:
			i += 1
	print(ans)


from itertools import groupby
s = input()
if 'm' in s or 'w' in s:
	print(0)
else:
	fib = [1, 2]
	for i in range(3, 10 ** 5 + 1):
		fib.append((fib[-1] + fib[-2]) % (10 ** 9 + 7))
	gb = [list(b) for (g, b) in groupby(s)]
	ss = 1
	for i in range(0, len(gb)):
		if (gb[i][0] == 'n' or gb[i][0] == 'u') and len(gb[i]) > 1:
			ss *= fib[len(gb[i]) - 1]
	print(max(1, ss % (10 ** 9 + 7)))


import sys
fib = [0] * 100005

def fibonacci(n):
	global fib
	(fib[1], fib[2]) = (1, 2)
	for i in range(3, n + 1):
		fib[i] = fib[i - 1] + fib[i - 2]
		fib[i] %= 1000000007
s = list(input())
fibonacci(len(s))
(i, ans, mod) = (0, 1, 1000000007)
while i < len(s):
	if s[i] == 'w' or s[i] == 'm':
		ans = 0
		break
	if s[i] == 'u' or s[i] == 'n':
		c = s[i]
		x = 0
		while i < len(s) and s[i] == c:
			x += 1
			i += 1
		i -= 1
		ans *= fib[x]
		ans %= mod
	i += 1
print(ans)
exit(0)


s = input()
L = [0] * (len(s) + 1)
inf = 1000000007
L[0] = 1
L[1] = 1
for i in range(1, len(s)):
	if s[i] == 'm' or s[i] == 'w':
		break
	if s[i] == 'u':
		if s[i - 1] == 'u':
			L[i + 1] = (L[i] + L[i - 1]) % inf
		else:
			L[i + 1] = L[i]
	elif s[i] == 'n':
		if s[i - 1] == 'n':
			L[i + 1] = (L[i] + L[i - 1]) % inf
		else:
			L[i + 1] = L[i]
	else:
		L[i + 1] = L[i]
if s[0] == 'm' or s[0] == 'w':
	L[len(s)] = 0
print(L[len(s)])


dp = [0] * 200005
mod = 1000000007
dp[2] = 2
dp[1] = 1
for i in range(3, 100005):
	dp[i] = (dp[i - 1] + dp[i - 2]) % mod
s = list(input())
if 'm' in s or 'w' in s:
	print(0)
else:
	ans = 1
	c = 1
	for i in range(1, len(s)):
		if s[i] == s[i - 1] and (s[i] == 'n' or s[i] == 'u'):
			c += 1
		else:
			if c >= 2:
				ans = ans * dp[c] % mod
			c = 1
	if c >= 2:
		ans = ans * dp[c] % mod
	print(ans)


def main():
	from functools import reduce
	inp = input().strip().lower()
	seq = set(inp)
	if any([i in seq for i in ['m', 'w']]):
		print(0)
		return

	def add(a, b):
		return (a % mod + b % mod) % mod
	mod = 10 ** 9 + 7
	dp = [0 for i in range(len(inp) + 7)]
	dp[0] = 1
	dp[1] = 1
	for i in range(2, len(inp) + 1):
		if inp[i - 1] not in ['u', 'n']:
			dp[i] = dp[i - 1]
			continue
		if inp[i - 1] == inp[i - 2]:
			dp[i] = add(dp[i - 1], dp[i - 2])
		else:
			dp[i] = dp[i - 1]
	print(dp[len(inp)])
main()


mod = 10 ** 9 + 7

def fibonacci(n):
	a = 1
	b = 1
	res = [1, 1]
	for i in range(n - 2):
		c = (a + b) % mod
		a = b
		b = c
		res.append(c % mod)
	return res
s = input()
fib = fibonacci(100000)
ans = 1
pl = ''
ct = 1
illStr = False
for i in range(len(s)):
	if s[i] == pl and (pl == 'u' or pl == 'n'):
		ct += 1
	else:
		ans *= fib[ct]
		pl = s[i]
		ct = 1
	if s[i] == 'm' or s[i] == 'w':
		illStr = True
if illStr:
	print(0)
else:
	ans *= fib[ct]
	print(ans % mod)


from __future__ import division, print_function
import sys
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
import os, sys, bisect, copy
from collections import defaultdict, Counter, deque
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
if os.path.exists('out.txt'):
	sys.stdout = open('out.txt', 'w')

def input():
	return sys.stdin.readline()

def mapi(arg=0):
	return map(int if arg == 0 else str, input().split())
a = input().strip()
n = len(a)
dp = [0] * (n + 1)
f = 1
dp[1] = 1
dp[0] = 1
if a[0] in 'wm':
	f = 0
mod = int(1000000000.0 + 7)
for i in range(1, n):
	dp[i + 1] = dp[i]
	if a[i] == a[i - 1] == 'u' or a[i] == a[i - 1] == 'n':
		dp[i + 1] += dp[i - 1]
	if a[i] in 'wm':
		f = 0
		break
	dp[i + 1] %= mod
if f:
	print(dp[n])
else:
	print(0)


fi = [0, 1]

def f(x):
	a = 0
	b = 1
	for _ in range(x):
		temp = a
		a += b
		b = temp
	return a

def main():
	text = input()
	nStreak = 1
	uStreak = 1
	x = []
	for char in text:
		if char == 'n' or char == 'u':
			if char == 'n':
				if uStreak > 1:
					x.append(uStreak)
					uStreak = 1
				nStreak += 1
			else:
				if nStreak > 1:
					x.append(nStreak)
					nStreak = 1
				uStreak += 1
		elif char == 'm' or char == 'w':
			print(0)
			return
		else:
			x.append(uStreak)
			uStreak = 1
			x.append(nStreak)
			nStreak = 1
	x.append(uStreak)
	x.append(nStreak)
	product = 1
	for i in x:
		product *= f(i)
	print(product % (10 ** 9 + 7))
main()


s = input()
if 'm' in s or 'w' in s:
	print(0)
	quit()
Fib = [1, 1]
MOD = int(1000000000.0 + 7)
for i in range(100000):
	Fib.append((Fib[-1] + Fib[-2]) % MOD)
ans = 1
l = '.'
cnt = 0
for i in s:
	if i == l:
		cnt += 1
	else:
		if l == 'u' or l == 'n':
			ans = ans * Fib[cnt] % MOD
		l = i
		cnt = 1
if l == 'u' or l == 'n':
	ans = ans * Fib[cnt] % MOD
print(ans)


word = input()
mul = 1
flag = -1
count = 1
for i in range(len(word) - 1):
	if word[i] == 'm' or word[i] == 'w':
		print(0)
		exit(0)
	if word[i] == 'u' and word[i + 1] == 'u':
		count += 1
		flag = 0
	elif flag == 0:
		a1 = 1
		a2 = 2
		c = 2
		while c < count:
			temp = a2
			a2 += a1
			a1 = temp
			c += 1
		mul *= a2
		flag = -1
		count = 1
	elif word[i] == 'n' and word[i + 1] == 'n':
		count += 1
		flag = 1
	elif flag == 1:
		a1 = 1
		a2 = 2
		c = 2
		while c < count:
			temp = a2
			a2 += a1
			a1 = temp
			c += 1
		mul *= a2
		flag = -1
		count = 1
if count > 1:
	a1 = 1
	a2 = 2
	c = 2
	while c < count:
		temp = a2
		a2 += a1
		a1 = temp
		c += 1
	mul *= a2
	flag = -1
	count = 1
if word[len(word) - 1] == 'm' or word[len(word) - 1] == 'w':
	mul = 0
print(mul % (1000000000 + 7))


s = input()
s = list(s)
n = len(s)
dp = [1 for i in range(n + 1)]
dp[0] = 1
dp[1] = 1
mod = pow(10, 9) + 7
flag = 0
if 'm' in s or 'w' in s:
	print('0')
	flag = 1
if flag == 0:
	for i in range(2, n + 1):
		dp[i] = dp[i - 1]
		if s[i - 1] == s[i - 2] and (s[i - 1] == 'u' or s[i - 1] == 'n'):
			dp[i] = (dp[i] + dp[i - 2]) % mod
	print(dp[n])


mod = 10 ** 9 + 7
a = input()
a += '9'
l = a[0]
k = 1
p = 1
dp = [0] * (len(a) + 1)
dp[0] = dp[1] = 1
if 'm' in a or 'w' in a:
	print(0)
	exit()
else:
	for i in range(2, len(a)):
		if a[i - 2] == a[i - 1] and (a[i - 1] == 'u' or a[i - 1] == 'n'):
			dp[i] = (dp[i - 1] + dp[i - 2]) % mod
		else:
			dp[i] = dp[i - 1] % mod
	print(dp[len(a) - 1] % mod)


s = input()
cu = 1
cn = 1
a = []
c = []
a.append(1)
a.append(2)
for i in range(2, 10 ** 5 + 1):
	a.append((a[i - 1] + a[i - 2]) % (10 ** 9 + 7))
flag = False
for i in range(len(s) - 1):
	if s[i] == 'u' and s[i + 1] == 'u':
		flag = True
		cu = cu + 1
	elif flag == True:
		c.append(a[cu - 1])
		flag = False
		cu = 1
if flag:
	c.append(a[cu - 1])
flag = False
for i in range(len(s) - 1):
	if s[i] == 'n' and s[i + 1] == 'n':
		flag = True
		cn = cn + 1
	elif flag == True:
		c.append(a[cn - 1])
		flag = False
		cn = 1
if flag:
	c.append(a[cn - 1])
f_flag = False
for i in s:
	if i == 'm' or i == 'w':
		f_flag = True
		break
if f_flag:
	print(0)
else:
	p = 1
	for i in range(len(c)):
		p = p * c[i] % (10 ** 9 + 7)
	print(p)


fib = [1, 1, 2]
mod = 1000000007
for _ in range(100000):
	fib.append((fib[-1] % mod + fib[-2] % mod) % mod)
a = input()
curr_length = 0
curr_char = 'u'
ans = 1
flag = 0
for i in range(0, len(a)):
	if a[i] == 'm' or a[i] == 'w':
		print(0)
		flag = 1
		break
	if a[i] == 'u' and curr_char == 'u':
		curr_length += 1
	elif a[i] == 'n' and curr_char == 'n':
		curr_length += 1
	elif a[i] == 'u' and curr_char == 'n':
		ans = ans * fib[curr_length] % mod
		curr_char = 'u'
		curr_length = 1
	elif a[i] == 'n' and curr_char == 'u':
		ans = ans * fib[curr_length] % mod
		curr_char = 'n'
		curr_length = 1
	else:
		ans = ans * fib[curr_length] % mod
		curr_char = a[i]
		curr_length = 1
ans = ans * fib[curr_length] % mod
if flag == 0:
	print(ans)


import sys
s = sys.stdin.readline().rstrip()

def f(a):
	if a == 1:
		return 1
	dp = [0] * (a + 1)
	dp[0] = 0
	dp[1] = 1
	dp[2] = 2
	for i in range(3, a + 1):
		dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
	return dp[a]
for i in range(len(s)):
	if s[i] == 'm' or s[i] == 'w':
		print(0)
		exit(0)
mul = 1
idx = 0
n = len(s)
vis = [0] * n
if s[0] == 'n':
	vis[0] = 1
for i in range(1, n):
	if s[i] == 'n':
		vis[i] = vis[i - 1] + 1
vis2 = [0] * n
if s[0] == 'u':
	vis2[0] = 1
for i in range(1, n):
	if s[i] == 'u':
		vis2[i] = vis2[i - 1] + 1
maxval = 0
while idx < n:
	if vis[idx] > 0:
		maxval = max(maxval, vis[idx])
	elif vis[idx] == 0:
		if maxval != 0:
			mul *= f(maxval)
			mul %= 1000000007
			maxval = 0
	idx += 1
if maxval != 0:
	mul *= f(maxval)
	mul %= 1000000007
idx = 0
maxval = 0
while idx < n:
	if vis2[idx] > 0:
		maxval = max(maxval, vis2[idx])
	elif vis2[idx] == 0:
		if maxval != 0:
			mul *= f(maxval)
			mul %= 1000000007
			maxval = 0
	idx += 1
if maxval != 0:
	mul *= f(maxval)
	mul %= 1000000007
print(mul)


import sys, os, io
from sys import stdin
from math import log, gcd, ceil
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
import math
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(int(i))
			n = n / i
	if n > 2:
		l.append(n)
	return list(set(l))

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def prefix_sum(arr):
	r = [0] * (len(arr) + 1)
	for (i, el) in enumerate(arr):
		r[i + 1] = r[i] + el
	return r

def divideCeil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def si():
	return input()

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
t = 1
for _ in range(t):
	s = list(input())
	n = len(s)
	if 'm' in s or 'w' in s:
		print(0)
		continue
	if len(s) == 1:
		print(1)
		continue
	dp = [0] * 100001
	dp[0] = 1
	dp[1] = 1
	dp[2] = 2
	mod = 1000000007
	if n >= 3:
		for i in range(3, n + 1):
			dp[i] += (dp[i - 1] + dp[i - 2]) % mod
	res = 1
	curm = 0
	curw = 0
	for i in range(1, n):
		if s[i] == s[i - 1] == 'n':
			curw += 1
		elif s[i] == s[i - 1] == 'u':
			curm += 1
		else:
			res = res * dp[curm + 1] % mod
			res = res * dp[curw + 1] % mod
			curw = 0
			curm = 0
	if s[-1] == s[-2]:
		res = res * dp[curw + 1] % mod
		res = res * dp[curm + 1] % mod
	print(res)


s = input()
cnt = 1
arr = []
n = len(s)
check = True
if s[0] == 'm' or s[0] == 'w':
	check = False
for i in range(1, len(s)):
	if s[i] == 'm' or s[i] == 'w':
		check = False
	if s[i] != s[i - 1]:
		if s[i - 1] == 'n' or s[i - 1] == 'u':
			arr.append(cnt)
		cnt = 1
	else:
		cnt = cnt + 1
if s[n - 1] == 'n' or s[n - 1] == 'u':
	arr.append(cnt)
if not check:
	print(0)
	exit(0)
mod = int(1000000007)
fib = [0] * 100010
fib[1] = 1
fib[2] = 1
for i in range(3, 100010):
	fib[i] = (fib[i - 1] + fib[i - 2]) % mod
ans = 1
for i in arr:
	ans = ans * fib[i + 1] % mod
print(ans)


o = input()
if o.count('m') > 0 or o.count('w') > 0:
	print(0)
else:
	x = [0 for i in range(100002)]
	x[0] = 1
	x[1] = 1
	for i in range(2, 100002):
		x[i] = (x[i - 1] + x[i - 2]) % 1000000007
	ucount = 0
	ncount = 0
	ans = 1
	for i in range(len(o)):
		if o[i] == 'n':
			ncount += 1
			if ucount > 0:
				ans *= x[ucount]
				ans %= 1000000007
				ucount = 0
		elif o[i] == 'u':
			ucount += 1
			if ncount > 0:
				ans *= x[ncount]
				ans %= 1000000007
				ncount = 0
		elif ucount + ncount > 0:
			ans *= x[ucount + ncount]
			ans %= 1000000007
			ucount = 0
			ncount = 0
	ans *= x[ncount + ucount]
	ans %= 1000000007
	print(ans)


from sys import stdin
input = stdin.readline
s = input() + '1'
mod = 10 ** 9 + 7
d = {}
prev = s[0]
if prev in ['w', 'm']:
	print(0)
else:
	s1 = 0
	f = 0
	if prev in ['u', 'n']:
		s1 += 1
	for i in s[1:]:
		if i in ['w', 'm']:
			print(0)
			f = 1
			break
		if i in ['u', 'n'] and i == prev:
			s1 += 1
		else:
			if s1 > 1:
				if s1 in d:
					d[s1] += 1
				else:
					d[s1] = 1
			s1 = 1
		prev = i
	if f == 0:
		p = 1
		if d:
			n = max(d.keys())
			fib = {0: 1, 1: 1}
			(a, b) = (1, 1)
			for i in range(2, n + 1):
				c = a + b
				if i in d:
					fib[i] = c
				a = b
				b = c
			for i in d:
				v = fib[i] ** d[i]
				p *= v
				p %= mod
		print(p)


mod = 1000 * 1000 * 1000 + 7
s = input()
if 'm' in s or 'w' in s:
	print(0)
else:
	chunks = []
	cnt_n = 0
	cnt_u = 0
	prev = ''
	for c in s + ']':
		if c == 'n':
			if cnt_u > 0:
				chunks.append(cnt_u)
				cnt_u = 0
			if prev == 'n':
				cnt_n += 1
			else:
				cnt_n = 1
		elif c == 'u':
			if cnt_n > 0:
				chunks.append(cnt_n)
				cnt_n = 0
			if prev == 'u':
				cnt_u += 1
			else:
				cnt_u = 1
		else:
			if cnt_n > 0:
				chunks.append(cnt_n)
				cnt_n = 0
			if cnt_u > 0:
				chunks.append(cnt_u)
				cnt_u = 0
		prev = c
	if len(chunks) == 0:
		print(1)
	else:
		fib = [1] * (100000 + 100)
		for i in range(2, len(fib)):
			fib[i] = (fib[i - 1] + fib[i - 2]) % mod
		ans = fib[chunks[0]]
		for c in chunks[1:]:
			ans = ans * fib[c] % mod
		print(ans)


x = input()
mod = 1000000007
prec = [0] * 100001
prec[1] = 1
prec[2] = 2
for i in range(3, 100001):
	prec[i] = (prec[i - 2] + prec[i - 1]) % mod
if 'w' in x or 'm' in x:
	print(0)
else:
	prev = x[0]
	k = 1
	res = 1
	for c in x[1:]:
		if c in 'un' and c == prev:
			k += 1
		else:
			res = res * prec[k] % mod
			k = 1
		prev = c
	res = res * prec[k] % mod
	print(res % mod)


s = input()
ch = '#'
count = 0
ans = 1
mod = 1000000007
f = [1, 1, 2]
for i in range(3, 100001):
	f.append((f[-1] + f[-2]) % mod)
s += '$'
ok = True
for i in range(len(s)):
	if s[i] == 'm' or s[i] == 'w':
		print(0)
		ok = False
		break
	if s[i] == ch:
		count += 1
	else:
		if ch == 'n' or ch == 'u':
			ans = ans * f[count] % mod
		ch = s[i]
		count = 1
if ok:
	print(ans)


from sys import stdin, stdout, stderr
a = stdin.readline()
print = lambda x: stdout.write(str(x))
if 'w' in a or 'm' in a:
	print(0)
	exit()
p = 'TKD'
x = [0, 1]
mod = pow(10, 9) + 7
for i in a:
	if i == p and i in 'nu':
		x += [(x[-1] + x[-2]) % mod]
	else:
		x += [x[-1] % mod]
	p = i
print(x[-1])


import re
s = input()
result = [1]
for (i, _) in enumerate(s):
	if _ != 'n' and _ != 'u' or not i or _ != s[i - 1]:
		result.append(result[-1])
	else:
		result.append((result[-1] + result[-2]) % (10 ** 9 + 7))
print([result[-1], 0]['w' in s or 'm' in s])


dp = [0] * 100005
dp[1] = 1
dp[2] = 2
m = 1000000007
for i in range(3, 100001):
	dp[i] = (dp[i - 1] % m + dp[i - 2] % m) % m
s = str(input())
ss = 1
i = 0
flag = 1
while i < len(s):
	if s[i] == 'w' or s[i] == 'm':
		print('0')
		flag = 0
		break
	if s[i] == 'n':
		t = 1
		i += 1
		while i != len(s) and s[i] == 'n':
			t += 1
			i += 1
		ss *= dp[t]
	elif s[i] == 'u':
		t = 1
		i += 1
		while i != len(s) and s[i] == 'u':
			t += 1
			i += 1
		ss *= dp[t]
	else:
		i += 1
if flag == 1:
	ss = ss % m
	print(ss)


s = input()
n = len(s)
f = []
f.append(1)
f.append(1)
for i in range(2, n + 1):
	f.append((f[i - 1] + f[i - 2]) % 1000000007)
if 'm' in s or 'w' in s:
	print(0)
else:
	ans = 1
	n = len(s)
	i = 0
	while i < n:
		count1 = 0
		count2 = 0
		if s[i] == 'n':
			while i < n and s[i] == 'n':
				count1 = count1 + 1
				i = i + 1
			ans = ans * f[count1]
			count1 = 0
		elif s[i] == 'u':
			while i < n and s[i] == 'u':
				count2 = count2 + 1
				i = i + 1
			ans = ans * f[count2]
			count2 = 0
		else:
			i = i + 1
	print(ans % 1000000007)


s = input()
s_ct = 0
n_ct = 0
ans = []
dp = [0 for _ in range(len(s) + 5)]
dp[0] = 1
dp[1] = 1
dp[2] = 2
a = 1
for i in range(3, len(dp)):
	dp[i] = (dp[i - 1] + dp[i - 2]) % (10 ** 9 + 7)
for i in range(len(s)):
	if s[i] == 'm':
		a = 0
	if s[i] == 'w':
		a = 0
	if s[i] == 'u':
		if n_ct:
			ans.append(n_ct)
			n_ct = 0
		s_ct += 1
	elif s[i] == 'n':
		if s_ct:
			ans.append(s_ct)
			s_ct = 0
		n_ct += 1
	else:
		if s_ct:
			ans.append(s_ct)
			s_ct = 0
		if n_ct:
			ans.append(n_ct)
			n_ct = 0
if s_ct:
	ans.append(s_ct)
	s_ct = 0
if n_ct:
	ans.append(n_ct)
	n_ct = 0
for i in ans:
	a = a * dp[i] % (10 ** 9 + 7)
print(a)


from pprint import pprint
mod = int(1000000000.0) + 7
s = input()
if 'm' in s or 'w' in s:
	print(0)
else:
	n = len(s)
	dp = [[0, 0] for i in range(n)]
	for i in range(1, n):
		dp[i][0] = (dp[i - 1][0] + dp[i - 1][1]) % mod
		if s[i] in 'un':
			if s[i] == s[i - 1]:
				dp[i][1] = (1 + dp[i - 1][0]) % mod
	print((dp[-1][0] + dp[-1][1] + 1) % mod)


mod = 1000000007
s = input()
n = len(s)
if 'w' in s or 'm' in s:
	print(0)
	exit()
dp = [0] * (n + 1)
dp[1] = 1
dp[0] = 1
for i in range(2, n + 1):
	dp[i] = dp[i - 1]
	if s[i - 1] == s[i - 2] and (s[i - 1] == 'u' or s[i - 1] == 'n'):
		dp[i] = dp[i - 1] + dp[i - 2]
		dp[i] %= mod
print(dp[n])


def fib(n):
	mod = 1000000007
	if n == 1 or n == 0:
		return 1
	else:
		f = [0] * (n + 1)
		f[0] = 1
		f[1] = 1
		for i in range(2, n + 1):
			f[i] = (f[i - 1] + f[i - 2]) % mod
		return f[n]
mod = 1000000007
s = input()
res = 1
flag1 = 0
flag2 = 0
c1 = 0
c2 = 0
for i in range(len(s)):
	if s[i] == 'm':
		print(0)
		exit()
	elif s[i] == 'w':
		print(0)
		exit()
	elif s[i] == 'u':
		flag2 = 0
		if flag1 == 0:
			flag1 = 1
			c1 = 1
		else:
			c1 += 1
	elif s[i] == 'n':
		flag1 = 0
		if flag2 == 0:
			flag2 = 1
			c2 = 1
		else:
			c2 += 1
	else:
		flag2 = 0
		flag1 = 0
	if flag1 == 0:
		res = res * fib(c1) % mod
		c1 = 0
	if flag2 == 0:
		res = res * fib(c2) % mod
		c2 = 0
res = res = res * fib(c1) % mod
res = res * fib(c2) % mod
print(res % mod)


def fib(n):
	if n == 0:
		return (0, 1)
	p = fib(n >> 1)
	c = p[0] * (2 * p[1] - p[0])
	d = p[0] * p[0] + p[1] * p[1]
	if n & 1:
		return (d, c + d)
	return (c, d)
s = input()
num = 1
flag = False
cur = 'x'
count = 0
for i in s:
	if i == 'm' or i == 'w':
		print(0)
		flag = True
		break
	if i == cur:
		if cur == 'u' or cur == 'n':
			count += 1
		continue
	if cur != 'u' and cur != 'n':
		if i == 'u' or i == 'n':
			cur = i
			count += 1
		continue
	num *= fib(count + 1)[0]
	num %= 1000000007
	if i == 'u' or i == 'n':
		cur = i
		count = 1
		continue
	else:
		count = 0
		cur = i
		continue
si = len(s) - 1
if flag == False:
	if s[si] != 'u' and s[si] != 'n':
		print(num)
	else:
		num *= fib(count + 1)[0]
		num %= 1000000007
		print(num)


s = input()
n = len(s)
mod = 10 ** 9 + 7
DP = [[0] * 2 for _ in range(n + 1)]
DP[1][0] = 1
for i in range(2, n + 1):
	DP[i][0] = (DP[i - 1][0] + DP[i - 1][1]) % mod
	DP[i][1] = DP[i - 1][0] % mod
ans = 1
s += 'z'
(uc, nc) = (0, 0)
for ss in s:
	if ss == 'm' or ss == 'w':
		ans *= 0
	elif ss == 'u':
		if nc > 0:
			ans = ans * (DP[nc][0] + DP[nc][1]) % mod
			uc = 1
		else:
			uc += 1
		nc = 0
	elif ss == 'n':
		if uc > 0:
			ans = ans * (DP[uc][0] + DP[uc][1]) % mod
			nc = 1
		else:
			nc += 1
		uc = 0
	else:
		if uc > 0:
			ans = ans * (DP[uc][0] + DP[uc][1]) % mod
		elif nc > 0:
			ans = ans * (DP[nc][0] + DP[nc][1]) % mod
		(uc, nc) = (0, 0)
print(ans)


mod = 1000000007
s = input()
n = len(s)
ans = 1
fib = [0] * 100001
fib[2] = 2
fib[3] = 3
for i in range(4, 100001):
	fib[i] = (fib[i - 1] % mod + fib[i - 2] % mod) % mod
i = 0
mm = s.count('m')
ww = s.count('w')
while i < n:
	j = i + 1
	c = s[i]
	count = 1
	if c == 'n' or c == 'u':
		while j < n and s[j] == s[j - 1]:
			count += 1
			j += 1
	if count > 1:
		ans = ans % mod * fib[count] % mod % mod
	i = j
if mm > 0 or ww > 0:
	print(0)
else:
	print(ans)


inp = input().strip()
n = len(inp)
md = int(1000000000.0 + 7)
dp = [1, 1]
if 'w' in inp or 'm' in inp:
	print('0')
else:
	for i in range(2, n + 1):
		dp.append(dp[i - 1])
		if inp[i - 1] == inp[i - 2] and (inp[i - 1] == 'u' or inp[i - 1] == 'n'):
			dp[i] = (dp[i] + dp[i - 2]) % md
	print(dp[n])


def run_testcase():
	string = input()
	prime = 10 ** 9 + 7
	fib_values = [None] * (10 ** 5 + 1)
	fib_values[0] = 0
	fib_values[1] = 1
	fib_values[2] = 2
	for i in range(3, 10 ** 5 + 1):
		fib_values[i] = (fib_values[i - 1] + fib_values[i - 2]) % prime

	def fib_mod(n, mod):
		return fib_values[n]
	last_char = None
	last_char_count = 0
	repetitions = []
	for char in string:
		if char == 'm' or char == 'w':
			return 0
		if last_char == None:
			last_char = char
			last_char_count += 1
			continue
		if char == last_char:
			last_char_count += 1
		else:
			if last_char == 'u' or last_char == 'n':
				repetitions.append(last_char_count)
			last_char = char
			last_char_count = 1
	if last_char == 'u' or last_char == 'n':
		repetitions.append(last_char_count)
	count = 1
	for repetition in repetitions:
		if repetition == 1:
			continue
		if repetition == 2:
			count = count * 2 % prime
			continue
		if repetition != 0:
			count = count * fib_mod(repetition, prime) % prime
	return count
print(str(run_testcase()))


import sys
import itertools
import math
import collections
from collections import Counter

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 1
	prime[0] = prime[1] = False
	r = [p for p in range(n + 1) if prime[p]]
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def ceil(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)
MOD = 10 ** 9 + 7
f = [1, 2]
for i in range(2, 10 ** 5 + 1):
	f.append((f[i - 1] + f[i - 2]) % MOD)
s = input()
for i in s:
	if i in {'m', 'w'}:
		exit(print(0))
t = []
i = 0
while i < len(s):
	c = 0
	if s[i] == 'u':
		while i < len(s) and s[i] == 'u':
			i += 1
			c += 1
		t.append(c)
	elif s[i] == 'n':
		while i < len(s) and s[i] == 'n':
			i += 1
			c += 1
		t.append(c)
	else:
		i += 1
res = 1
for i in t:
	res = res * f[i - 1] % MOD
print(res)


from math import gcd

def fibo(n):
	a = 0
	b = 1
	if n < 0:
		print('Incorrect input')
	elif n == 0:
		return a
	elif n == 1:
		return b
	else:
		for i in range(2, n):
			c = a + b
			a = b
			b = c
		return b
mod = 10 ** 9 + 7
s = input()
ans = 1
i = 0
while i < len(s):
	if s[i] == 'm' or s[i] == 'w':
		ans = 0
		break
	if s[i] == 'u':
		c = 0
		while s[i] == 'u':
			if i > len(s) - 1:
				break
			i = i + 1
			c = c + 1
			if i > len(s) - 1:
				break
		ans = ans * (fibo(c + 2) % mod) % mod
	elif s[i] == 'n':
		c = 0
		while s[i] == 'n':
			if i > len(s) - 1:
				break
			i = i + 1
			c = c + 1
			if i > len(s) - 1:
				break
		ans = ans * (fibo(c + 2) % mod) % mod
	else:
		i = i + 1
print(ans % mod)


s = str(input())
n = len(s)
import math
an = []
i = 0
while i < n:
	if s[i] == 'n':
		nb = 1
		j = i + 1
		while j < n and s[j] == 'n':
			j += 1
			nb += 1
		if nb > 1:
			an.append(nb)
		i = j
	elif s[i] == 'u':
		nb = 1
		j = i + 1
		while j < n and s[j] == 'u':
			j += 1
			nb += 1
		if nb > 1:
			an.append(nb)
		i = j
	else:
		i += 1
mod = 10 ** 9 + 7
if 'm' in s or 'w' in s:
	print(0)
	exit()
anss = [0, 1, 2, 3, 5]
for i in range(5, 10 ** 5 + 1):
	anss.append((anss[-1] + anss[-2]) % mod)
ans = 1
for i in an:
	ans = ans * anss[i] % mod
print(ans % mod)


import sys
sys.setrecursionlimit(100000)

def f(i):
	if i == n:
		return 1
	if dp[i] != -1:
		return dp[i]
	MOD = 10 ** 9 + 7
	ans = f(i + 1)
	ans %= MOD
	if s[i] == 'u':
		if i + 1 < n and s[i + 1] == 'u':
			ans += f(i + 2)
			ans %= MOD
	if s[i] == 'n':
		if i + 1 < n and s[i + 1] == 'n':
			ans += f(i + 2)
			ans %= MOD
	dp[i] = ans % (10 ** 9 + 7)
	return ans
s = input()
n = len(s)
if 'm' in s or 'w' in s:
	print(0)
else:
	dp = [-1 for i in range(n + 1)]
	MOD = 10 ** 9 + 7
	for i in range(n, -1, -1):
		if i == n:
			dp[i] = 1
		else:
			dp[i] = dp[i + 1] % MOD
			if s[i] == 'u':
				if i + 1 < n and s[i + 1] == 'u':
					dp[i] += dp[i + 2]
					dp[i] %= MOD
			if s[i] == 'n':
				if i + 1 < n and s[i + 1] == 'n':
					dp[i] += dp[i + 2]
					dp[i] %= MOD
	print(dp[0] % (10 ** 9 + 7))


s = list(input())
n = len(s)
if 'm' in s or 'w' in s:
	print(0)
elif n == 1:
	print(1)
else:
	ost = 10 ** 9 + 7
	a = [0] * n
	if s[0] == s[1] and (s[0] == 'n' or s[0] == 'u'):
		a[0] = 1
		a[1] = 2
	else:
		a[0] = 1
		a[1] = 1
	for i in range(2, n):
		a[i] = a[i - 1]
		if s[i] == s[i - 1] and (s[i - 1] == 'n' or s[i - 1] == 'u'):
			a[i] = (a[i] + a[i - 2]) % ost
	print(a[n - 1])


t = pow(10, 9) + 7
n = input()
list1 = list()
list1.append(1)
list1.append(2)
for i in range(2, len(n)):
	list1.append((list1[i - 2] + list1[i - 1]) % t)
ans = 1
for i in range(len(n)):
	if n[i] == 'm' or n[i] == 'w':
		print(0)
		exit(0)
i = 0
while i < len(n):
	count = 0
	if n[i] == 'n':
		while i < len(n) and n[i] == 'n':
			count += 1
			i += 1
		ans = ans * list1[count - 1] % t
	elif n[i] == 'u':
		while i < len(n) and n[i] == 'u':
			count += 1
			i += 1
		ans = ans * list1[count - 1] % t
	else:
		i += 1
print(ans)


s = input()
a = s.count('m')
f = True
ans = 0
if a > 0:
	f = False
a = s.count('w')
if a > 0:
	f = False
n = len(s)
if f == True:
	dp = [0] * (n + 1)
	dp[0] = 1
	dp[1] = 1
	for i in range(2, n + 1):
		if s[i - 1] == s[i - 2] and (s[i - 1] == 'u' or s[i - 1] == 'n'):
			dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
		else:
			dp[i] = dp[i - 1]
	print(dp[n])
else:
	print(0)


import math

def power(L, n, p):
	if n == 1:
		return L
	elif n % 2 == 0:
		A = power(L, n // 2, p)
		return multiply(A, A, p)
	else:
		A = power(L, n // 2, p)
		return multiply(A, multiply(A, L, p), p)

def multiply(A, B, p):
	l = len(A)
	if len(B) == len(A[0]):
		m = len(B)
		n = len(B[0])
		C = [[0 for i in range(n)] for j in range(l)]
		for i in range(0, l):
			for j in range(0, n):
				sum = 0
				for k in range(0, m):
					sum += A[i][k] * B[k][j]
				C[i][j] = sum % p
		return C
	else:
		return 'Invalid Inputs'

def fib(n, p):
	if n == 0:
		return 0
	else:
		A = [[1, 1], [1, 0]]
		B = power(A, n, p)
		return B[0][1] % p

def validstrings(s):
	n = len(s)
	L = []
	count = 1
	if s[0] == 'm' or s[0] == 'w':
		return 0
	for i in range(1, n):
		if s[i] == 'm' or s[i] == 'w':
			return 0
		elif s[i] == s[i - 1] == 'u' or s[i] == s[i - 1] == 'n':
			count += 1
		else:
			if count != 1:
				L.append(count)
			count = 1
	if count != 1:
		L.append(count)
	return L
p = 10 ** 9 + 7
s = str(input())
if validstrings(s) == 0:
	print(0)
elif len(validstrings(s)) == 0:
	print(1)
else:
	pro = 1
	L = validstrings(s)
	for i in range(0, len(L)):
		pro = pro % p * fib(1 + L[i], p) % p
	print(pro)


s = input()
if s.find('m') == -1 and s.find('w') == -1:
	l = 0
	r = 0
	k = 1
	st = 1
	sp = 1
	for i in range(len(s)):
		if i > 0 and s[i] == 'n' and (s[i - 1] == 'n') or (i > 0 and s[i] == 'u' and (s[i - 1] == 'u')):
			t = sp
			sp = st + sp
			st = t
			if i == len(s) - 1:
				k *= sp
		else:
			k *= sp
			st = 1
			sp = 1
			l = i
		r = i
	print(k % (10 ** 9 + 7))
else:
	print(0)


s = input()
lens = len(s)
dp = [-1] * 100002
for x in s:
	if x == 'm' or x == 'w':
		print('0')
		break
else:
	i = 0
	ans = 1
	dp[0] = 1
	dp[1] = 1
	for j in range(2, 100002):
		dp[j] = (dp[j - 1] + dp[j - 2]) % 1000000007
	while i < lens:
		if s[i] == 'n':
			j = i
			i += 1
			while i < lens and s[i] == 'n':
				i += 1
			ans = ans * dp[i - j] % 1000000007
		elif s[i] == 'u':
			j = i
			i += 1
			while i < lens and s[i] == 'u':
				i += 1
			ans = ans * dp[i - j] % 1000000007
		else:
			i += 1
	print(ans)


import math

def fib(n):
	F = [[1, 1], [1, 0]]
	if n == 0:
		return 0
	power(F, n - 1)
	return F[0][0]

def multiply(F, M):
	x = F[0][0] * M[0][0] + F[0][1] * M[1][0]
	y = F[0][0] * M[0][1] + F[0][1] * M[1][1]
	z = F[1][0] * M[0][0] + F[1][1] * M[1][0]
	w = F[1][0] * M[0][1] + F[1][1] * M[1][1]
	F[0][0] = x
	F[0][1] = y
	F[1][0] = z
	F[1][1] = w

def power(F, n):
	M = [[1, 1], [1, 0]]
	for i in range(2, n + 1):
		multiply(F, M)
s = input()
if 'w' in s or 'm' in s:
	print(0)
else:
	prod = 1
	mod = 1000000007
	n = len(s)
	c = 0
	for i in range(n):
		if s[i] == 'u':
			c += 1
		else:
			f = fib(c + 1)
			prod = prod * (f % mod) % mod
			c = 0
	f = fib(c + 1)
	prod = prod * (f % mod) % mod
	c = 0
	for i in range(n):
		if s[i] == 'n':
			c += 1
		else:
			f = fib(c + 1)
			prod = prod * (f % mod) % mod
			c = 0
	f = fib(c + 1)
	prod = prod * (f % mod) % mod
	c = 0
	print(prod)


x = str(input())
(dp, countn, countu, ans, mod) = ([0] * 100001, 0, 0, 1, 10 ** 9 + 7)
for i in range(1, len(x) + 1):
	if i == 1:
		dp[i] = 1
	elif i == 2:
		dp[i] = 2
	else:
		dp[i] = (dp[i - 1] + dp[i - 2]) % mod
for i in range(len(x)):
	if x[i] == 'm' or x[i] == 'w':
		ans = 0
		break
	if x[i] == 'n':
		countn += 1
	if countn > 0 and (x[i] != 'n' or i == len(x) - 1):
		ans = ans * dp[countn] % mod
		countn = 0
	if x[i] == 'u':
		countu += 1
	if countu > 0 and (x[i] != 'u' or i == len(x) - 1):
		ans = ans * dp[countu] % mod
		countu = 0
print(ans)


import sys
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
MOD = 10 ** 9 + 7
dp = [0] * (10 ** 5 + 10)
dp[0] = 1
dp[1] = 1
for i in range(2, 10 ** 5 + 10):
	dp[i] = dp[i - 1] + dp[i - 2]
	dp[i] %= MOD
s = input().rstrip() + '#'
if 'm' in s or 'w' in s:
	print(0)
	exit()
prev = s[0]
ans = 1
cnt = 0
if s[0] == 'u' or s[0] == 'n':
	cnt = 1
for ch in s[1:]:
	if ch == prev and (ch == 'u' or ch == 'n'):
		cnt += 1
	else:
		ans *= dp[cnt]
		ans %= MOD
		if ch == 'u' or ch == 'n':
			cnt = 1
		else:
			cnt = 0
	prev = ch
print(ans)


s = input()
d = dict()
e = 10 ** 9 + 7
ls = [0] * 10 ** 5
ls[1] = 1
ls[0] = 1
for i in range(2, 10 ** 5):
	ls[i] = (ls[i - 1] + ls[i - 2]) % e
ds = 0
for i in s:
	if i == 'm' or i == 'w':
		ds = 1
		break
n = len(s)
temp = []
i = 0
while i < n:
	if s[i] == 'u' or s[i] == 'n':
		j = i + 1
		count = 1
		while j < n and s[j] == s[i]:
			count += 1
			j += 1
		temp.append(count)
		i += count
	else:
		i += 1
if ds == 1:
	print(0)
else:
	xs = 1
	for i in range(len(temp)):
		xs = xs * ls[temp[i]]
	print(xs % (10 ** 9 + 7))


3
import array
from fractions import Fraction
import functools
import itertools
import math
import os
import sys

def main():
	S = inp()
	print(solve(S))
MOD = 10 ** 9 + 7

def solve(S):
	N = len(S)
	fib = [0] * (N + 1)
	fib[0] = fib[1] = 1
	for i in range(2, N + 1):
		fib[i] = (fib[i - 2] + fib[i - 1]) % MOD
	i = 0
	ans = 1
	while i < N:
		c = S[i]
		if c == 'm' or c == 'w':
			return 0
		if c != 'u' and c != 'n':
			i += 1
			continue
		j = i
		while j < N and S[i] == S[j]:
			j += 1
		ans *= fib[j - i]
		ans %= MOD
		i = j
	return ans
DEBUG = 'DEBUG' in os.environ

def inp():
	return sys.stdin.readline().rstrip()

def read_int():
	return int(inp())

def read_ints():
	return [int(e) for e in inp().split()]

def dprint(*value, sep=' ', end='\n'):
	if DEBUG:
		print(*value, sep=sep, end=end)

def __starting_point():
	main()
__starting_point()


s = input()
m = s.count('m')
w = s.count('w')
if m > 0 or w > 0:
	print(0)
	exit()
dp = [0] * 100010
dp[0] = 1
dp[1] = 1
for i in range(2, len(s) + 1):
	if s[i - 1] == s[i - 2]:
		if s[i - 1] == 'u' or s[i - 2] == 'n':
			dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
		else:
			dp[i] = dp[i - 1]
	else:
		dp[i] = dp[i - 1]
print(dp[len(s)] % 1000000007)


fib = [1] * 100005
fib[1] = 2
for i in range(2, len(fib)):
	fib[i] = (fib[i - 1] + fib[i - 2]) % 1000000007
s = input()
if 'm' in s or 'w' in s:
	print(0)
	exit()
else:
	ans = []
	curr = s[0]
	if curr == 'u' or curr == 'n':
		count = 1
	else:
		count = 0
	for i in range(1, len(s)):
		if s[i] == curr:
			count += 1
		else:
			if curr == 'u' or curr == 'n':
				ans.append(count)
			if s[i] == 'u':
				count = 1
				curr = 'u'
			elif s[i] == 'n':
				count = 1
				curr = 'n'
			else:
				curr = ''
				count = 0
	if curr == 'u' or curr == 'n':
		ans.append(count)
count = 1
for i in ans:
	count = count * fib[i - 1] % 1000000007
print(count)


s = input()
arr = [0] * (len(s) + 1)
arr[0] = 1
arr[1] = 1
if s[0] == 'm' or s[0] == 'w':
	print(0)
else:
	i = 1
	flag = 0
	while i < len(s):
		if s[i] == 'm' or s[i] == 'w':
			flag = 1
			break
		elif s[i] == s[i - 1] and (s[i] == 'u' or s[i] == 'n'):
			arr[i + 1] = (arr[i] + arr[i - 1]) % 1000000007
		else:
			arr[i + 1] = arr[i] % 1000000007
		i += 1
	if flag == 1:
		print(0)
	else:
		print(arr[-1] % 1000000007)


mod = 1000000007
fib = [1, 1, 2]
for i in range(3, 10 ** 5 + 1):
	fib.append((fib[i - 1] % mod + fib[i - 2] % mod) % mod)
a = input()
n = len(a)
prod = 1
i = 0
if 'm' in a or 'w' in a:
	print(0)
else:
	while i < n:
		if a[i] != 'u' and a[i] != 'n':
			i += 1
			continue
		cnt = 0
		while i < n and a[i] == 'u':
			cnt += 1
			i += 1
		prod = prod * fib[cnt] % mod
		cnt = 0
		while i < n and a[i] == 'n':
			cnt += 1
			i += 1
		prod = prod * fib[cnt] % mod
	print(prod)


s = input()

def fibo(n):
	if n == 1 or n == 0:
		return 1
	a = 1
	b = 2
	for i in range(n - 2):
		(a, b) = (b, a + b)
	return b % (10 ** 9 + 7)
if 'm' in s or 'w' in s:
	print(0)
else:
	k = 1
	u = 0
	n = 0
	for i in s:
		if i == 'u':
			u += 1
		else:
			k *= fibo(u)
			u = 0
		if i == 'n':
			n += 1
		else:
			k *= fibo(n)
			n = 0
	k *= fibo(n)
	k *= fibo(u)
	print(k % (10 ** 9 + 7))


def solve2(n):
	if n < 4:
		return n
	if n == 4:
		return 5
	f = 3
	s = 5
	i = 4
	while i < n:
		t = (f + s) % 1000000007
		f = s
		s = t
		i += 1
	return t

def solve():
	s = input()
	n = len(s)
	st = list(s)
	i = 0
	ans = 1
	while i < n:
		if st[i] == 'm' or st[i] == 'w':
			return 0
		if st[i] == 'n':
			c = 0
			while i < n and st[i] == 'n':
				i += 1
				c += 1
			x = solve2(c)
			ans *= x
		elif st[i] == 'u':
			c = 0
			while i < n and st[i] == 'u':
				i += 1
				c += 1
			x = solve2(c)
			ans *= x
		else:
			i += 1
	return ans
res = solve()
print(res % 1000000007)


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin, ceil, log2
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return list(factors)

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))
MOD = 1000000007
PMOD = 998244353
T = 1
for _ in range(T):
	a = str(stdin.readline().strip('\n'))
	n = len(a)
	d = [1, 1] + [0] * (n - 1)
	for i in range(2, n + 1):
		d[i] = (d[i - 1] + d[i - 2]) % MOD
	if 'w' in a or 'm' in a:
		print(0)
		continue
	uu = [0] * n
	nn = [0] * n
	if a[0] == 'u':
		uu[0] = 1
	if a[0] == 'n':
		nn[0] = 1
	for i in range(1, n):
		if a[i] == 'u':
			uu[i] = uu[i - 1] + 1
		else:
			uu[i] = 0
	for i in range(1, n):
		if a[i] == 'n':
			nn[i] = nn[i - 1] + 1
		else:
			nn[i] = 0
	s1 = []
	s2 = []
	for i in range(n - 1):
		if uu[i + 1] < uu[i] and uu[i] != 1:
			s1.append(uu[i])
	if uu[-1] > 1:
		s1.append(uu[-1])
	for i in range(n - 1):
		if nn[i + 1] < nn[i] and nn[i] != 1:
			s2.append(nn[i])
	if nn[-1] > 1:
		s2.append(nn[-1])
	ans = 1
	for i in s1:
		ans *= d[i] % MOD
	for i in s2:
		ans *= d[i] % MOD
	print(ans % MOD)


s = input()
dp = [0] * len(s)
dp[0] = 1
fl = True
for i in range(1, len(s)):
	if s[i] in 'mw':
		fl = False
		break
	if s[i] == s[i - 1] == 'u' or s[i] == s[i - 1] == 'n':
		if i == 1:
			dp[1] = 2
		else:
			dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
	else:
		dp[i] = dp[i - 1]
if fl == True and s[0] not in 'mw':
	print(dp[-1])
else:
	print(0)


N = int(1000000000.0 + 7)
arr = input()
if 'm' in arr or 'w' in arr:
	print(0)
elif len(arr) == 1:
	print(1)
else:
	dp = [0] * len(arr)
	dp[0] = 1
	dp[1] = 1
	if arr[1] == arr[0] and (arr[1] == 'n' or arr[1] == 'u'):
		dp[1] = 2
	for i in range(2, len(arr)):
		if arr[i] == arr[i - 1] and (arr[i] == 'n' or arr[i] == 'u'):
			dp[i] = (dp[i - 1] + dp[i - 2]) % N
		else:
			dp[i] = dp[i - 1] % N
	print(dp[-1])


s = input() + '0'
u = 0
n = 0
f = [0 for i in range(len(s) + 1)]
f[0] = 1
f[1] = 1
sm = 1
for i in range(2, len(s)):
	f[i] = f[i - 1] + f[i - 2]
	f[i] %= 1000000007
for i in range(len(s)):
	if s[i] == 'm':
		print(0)
		exit(0)
	elif s[i] == 'w':
		print(0)
		exit(0)
	if s[i] == 'u':
		u += 1
	else:
		if u != 0:
			sm *= f[u]
			sm %= 1000000007
		u = 0
	if s[i] == 'n':
		n += 1
	else:
		if n != 0:
			sm *= f[n]
			sm %= 1000000007
		n = 0
print(sm)


dp = [0, 1, 2, 3]
for i in range(4, 10 ** 5 + 2):
	dp.append((dp[i - 2] + dp[i - 1]) % (10 ** 9 + 7))
s = input() + 'a'
res = 1
count_u = 0
count_n = 0
for c in s:
	if c == 'm' or c == 'w':
		res = 0
		break
	elif c == 'u':
		count_u += 1
		if count_n > 0:
			res = res * dp[count_n] % (10 ** 9 + 7)
			count_n = 0
	elif c == 'n':
		count_n += 1
		if count_u > 0:
			res = res * dp[count_u] % (10 ** 9 + 7)
			count_u = 0
	else:
		if count_u > 0:
			res = res * dp[count_u] % (10 ** 9 + 7)
		if count_n > 0:
			res = res * dp[count_n] % (10 ** 9 + 7)
		count_u = 0
		count_n = 0
print(res)


dp = [0] * 100005
dp[1] = 1
dp[2] = 2
mod = 10 ** 9 + 7
for i in range(3, 100005):
	dp[i] = (dp[i - 1] % mod + dp[i - 2] % mod) % mod
for _ in range(1):
	s = input()
	flag = 1
	for i in range(len(s)):
		if s[i] == 'w' or s[i] == 'm':
			flag = 0
			break
	if flag == 0:
		print(0)
		continue
	n = []
	u = []
	i = 0
	while i < len(s):
		if s[i] == 'n':
			j = i
			n_count = 0
			while j < len(s) and s[j] == 'n':
				n_count += 1
				j += 1
			n.append(n_count)
			i = j
		elif s[i] == 'u':
			j = i
			u_count = 0
			while j < len(s) and s[j] == 'u':
				u_count += 1
				j += 1
			u.append(u_count)
			i = j
		else:
			i += 1
	ans = 1
	n = n + u
	for elem in n:
		ans = dp[elem] * ans % mod
	print(ans)


mod = 1000 * 1000 * 1000 + 7
s = input()
U = [0] * (10 ** 5 + 3)
W = [0] * (10 ** 5 + 3)
U[1] = 1
W[1] = 0
for i in range(2, 10 ** 5 + 3):
	U[i] = (W[i - 1] + U[i - 1]) % mod
	W[i] = U[i - 1]
cnt = 1
ser = 1
sm = s[0]
if s[0] == 'm' or s[0] == 'w':
	cnt = 0
for i in range(1, len(s)):
	if s[i] == 'm' or s[i] == 'w':
		cnt = 0
		break
	if s[i] != sm:
		if sm == 'u' or sm == 'n':
			cnt = cnt * (U[ser] + W[ser]) % mod
		ser = 1
	else:
		ser += 1
	sm = s[i]
if sm == 'u' or sm == 'n':
	cnt = cnt * (U[ser] + W[ser]) % mod
print(cnt)


import sys
input = sys.stdin.readline
s = list(input())[:-1]
mod = 10 ** 9 + 7

class Factorial:

	def __init__(self, n, mod):
		self.f = [1]
		for i in range(1, n + 1):
			self.f.append(self.f[-1] * i % mod)
		self.i = [pow(self.f[-1], mod - 2, mod)]
		for i in range(1, n + 1)[::-1]:
			self.i.append(self.i[-1] * i % mod)
		self.i.reverse()

	def factorial(self, i):
		return self.f[i]

	def ifactorial(self, i):
		return self.i[i]

	def combi(self, n, k):
		return self.f[n] * self.i[n - k] % mod * self.i[k] % mod
if len(s) >= 2:
	f = Factorial(len(s) + 1, mod)
	x = 0
	y = 0
	l = [[] for _ in range(len(s))]
	l[0].append(s[0])
	if s[0] == 'm' or s[0] == 'w':
		print(0)
		exit(0)
	for i in range(1, len(s)):
		if s[x] == s[i] and (s[i] == 'u' or s[i] == 'n'):
			l[y].append(s[i])
		else:
			l[y + 1].append(s[i])
			y += 1
			x = i
		if s[i] == 'm' or s[i] == 'w':
			print(0)
			exit(0)
	res = 1
	for i in range(len(s)):
		if len(l[i]) > 1:
			t = len(l[i])
			t2 = 1
			for j in range(1, t):
				if t - j < j:
					continue
				t2 += f.combi(t - j, j)
				t2 %= mod
			res *= t2
			res %= mod
	print(res)
elif len(s) == 0:
	print(0)
else:
	for i in range(len(s)):
		if s[i] == 'm' or s[i] == 'w':
			print(0)
			exit(0)
	print(1)


st = str(input())
n = len(st)
array = [1 for k in range(n)]
for k in range(1, n):
	if st[k] == 'u' and st[k - 1] == 'u' or (st[k] == 'n' and st[k - 1] == 'n'):
		array[k] = (array[k - 1] + array[k - 2]) % int(1000000000.0 + 7)
	else:
		array[k] = array[k - 1] % int(1000000000.0 + 7)
if 'm' in st or 'w' in st:
	print(0)
else:
	print(array[n - 1])


mod = 1000000007
arr = [1] * 100005
for i in range(2, 100005):
	arr[i] = (arr[i - 2] + arr[i - 1]) % mod
s = input()
s += '*'
product = 1
i = 0
while i < len(s):
	if s[i] == 'w' or s[i] == 'm':
		product = 0
	if s[i] == 'u' or s[i] == 'n':
		ct = 1
		while i < len(s) - 1 and s[i] == s[i + 1]:
			ct += 1
			i += 1
		product = arr[ct] * product % mod
	i += 1
print(product)


s = input()
n = len(s)
mod = 10 ** 9 + 7
c_w = s.count('w')
c_m = s.count('m')
if c_w > 0 or c_m > 0:
	print(0)
else:
	p1 = 0
	p2 = 0
	dp = [-1 for i in range(n)]
	if n > 1:
		dp[0] = 1
		if s[1] == s[0] and (s[0] == 'u' or s[0] == 'n'):
			dp[1] = 2
		else:
			dp[1] = 1
		for i in range(2, n):
			if s[i] == s[i - 1] and (s[i] == 'u' or s[i] == 'n'):
				dp[i] = (dp[i - 1] + dp[i - 2]) % mod
			else:
				dp[i] = dp[i - 1] % mod
		print(dp[-1] % mod)
	else:
		print(1)


from collections import Counter
import string
import math
import sys

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(number_of_variables):
	if number_of_variables == 1:
		return int(sys.stdin.readline())
	if number_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
mod = 10 ** 9 + 7
s = input()
if s.find('m') != -1 or s.find('w') != -1:
	print(0)
	exit()
dp = [1 for i in range(len(s) + 2)]
for i in range(2, len(s) + 1):
	if s[i - 1] == s[i - 2] and (s[i - 1] == 'u' or s[i - 1] == 'n'):
		dp[i] = (dp[i - 1] + dp[i - 2]) % mod
	else:
		dp[i] = dp[i - 1]
print(dp[len(s)] % mod)


MOD = 1000000007
l = list(input())
do = 1
for j in l:
	if j == 'm' or j == 'w':
		print(0)
		do = 0
		break
if do:
	dp = [0] * int(len(l) + 1)
	dp[0] = 1
	dp[1] = 1
	f = 0
	for t in range(2, len(l) + 1):
		dp[t] = dp[t - 1]
		if l[t - 1] == l[t - 2] and (l[t - 1] == 'u' or l[t - 1] == 'n'):
			dp[t] = (dp[t] + dp[t - 2]) % MOD
	if f:
		print(0)
	else:
		print(dp[-1])


s = input()
if s.find('m') != s.find('w'):
	print(0)
else:
	n = len(s)
	mod = 10 ** 9 + 7
	fb = [0] * (n + 1)
	fb[0] = 1
	fb[1] = 1
	for i in range(2, n + 1):
		fb[i] = (fb[i - 1] + fb[i - 2]) % mod
	us = 0
	ns = 0
	ans = 1
	for i in s:
		if i == 'u':
			us += 1
		else:
			ans *= fb[us]
			ans %= mod
			us = 0
		if i == 'n':
			ns += 1
		else:
			ans *= fb[ns]
			ans %= mod
			ns = 0
	ans *= fb[us]
	ans %= mod
	ans *= fb[ns]
	ans %= mod
	print(ans)


import math
m = 10 ** 9 + 7
f = [1]
f.append(1)

def store_fact(n):
	i = 2
	while i <= n:
		num = f[-1] / i
		f.append(num)
		i += 1

def ncr(a, b):
	return f[b] * f[a - b] / f[a]
s = input()
flag = True
for i in range(len(s)):
	if s[i] == 'w' or s[i] == 'm':
		flag = False
		break
if not flag:
	print(0)
else:
	n = len(s)
	cur = 1
	la = 1
	la1 = 1
	for i in range(1, len(s)):
		if s[i] == s[i - 1]:
			if s[i] == 'u' or s[i] == 'n':
				cur = la % m + la1 % m
			else:
				cur = la % m
		else:
			cur = la % m
		la1 = la % m
		la = cur % m
	print(cur % m)


import sys
import collections
import heapq
import math
input = sys.stdin.readline

def rints():
	return map(int, input().strip().split())

def rstr():
	return input().strip()

def rint():
	return int(input().strip())

def rintas():
	return [int(i) for i in input().strip().split()]

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
s = rstr()
if 'w' in s or 'm' in s:
	print(0)
	exit()
p = s[0]
(cnt, ans) = (1, 1)

def fib(i):
	(f, s) = (1, 1)
	for l in range(2, i + 1):
		t = s
		s = f + s
		f = t
	return s
for i in range(1, len(s)):
	if s[i] == p and (s[i] == 'n' or s[i] == 'u'):
		cnt += 1
	else:
		if cnt >= 2:
			ans = ans * fib(cnt)
		cnt = 1
	p = s[i]
if cnt >= 2:
	ans = ans * fib(cnt)
print(ans % (10 ** 9 + 7))


import math
import sys
from collections import defaultdict
rt = lambda : map(int, input().split())
ri = lambda : int(input())
rl = lambda : list(map(int, input().split()))

def solve(n, a):
	pass

def main():
	s = input()
	if 'w' in s or 'm' in s:
		print(0)
	else:
		MOD = 10 ** 9 + 7
		fib = [0] * (len(s) + 10)
		fib[2] = 2
		fib[3] = 3
		for i in range(4, len(fib)):
			fib[i] = (fib[i - 1] + fib[i - 2]) % MOD
		pos = 0
		res = 1
		while pos < len(s):
			if s[pos] in ('u', 'n'):
				pos2 = pos
				while pos2 + 1 < len(s) and s[pos2 + 1] == s[pos]:
					pos2 += 1
				size = pos2 - pos + 1
				if size > 1:
					res = res * fib[size] % MOD
				pos = pos2 + 1
			else:
				pos += 1
		print(res)
main()


s = input()
if 'm' in s or 'w' in s:
	print(0)
	exit()
dp = [1]
for (ind, i) in enumerate(s):
	if i != 'n' and i != 'u' or not ind or s[ind - 1] != i:
		dp.append(dp[-1])
	else:
		dp.append((dp[-1] + dp[-2]) % (10 ** 9 + 7))
print(dp[-1])


mod = 1000000000.0 + 7
mod = int(mod)

def calc(n):
	if n == 1:
		return 1
	if n == 2:
		return 2
	else:
		count = [0] * n
		count[0] = 1
		count[1] = 2
		for i in range(2, n):
			count[i] = (count[i - 1] + count[i - 2]) % mod
		return count[n - 1]
s = input()
ans = 1
i = 0
while i < len(s):
	if s[i] == 'u' or s[i] == 'n':
		j = i
		count = 0
		while j < len(s) and s[j] == s[i]:
			j += 1
			count += 1
		ans = ans * calc(count) % mod
		i = j
	elif s[i] == 'w' or s[i] == 'm':
		ans = 0
		break
	else:
		i += 1
print(ans)


MD = 10 ** 9 + 7

def main():
	s = input()
	n = len(s)
	fib = [0] * (n + 1)
	fib[0] = fib[1] = 1
	i = 2
	while i <= n:
		fib[i] = (fib[i - 1] + fib[i - 2]) % MD
		i += 1
	i = 0
	ans = 1
	while i < n:
		si = s[i]
		if si == 'w' or si == 'm':
			print(0)
			return
		j = i + 1
		if si == 'u' or si == 'n':
			while j < n and s[j] == si:
				j += 1
			ans = ans * fib[j - i] % MD
		i = j
	print(ans)
main()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
s = input()
dp = [0] * 3
dp[0] = 1
dp[1] = 1
if 'm' in s or 'w' in s:
	print(0)
elif len(s) == 1:
	print(1)
else:
	for i in range(1, len(s)):
		if s[i] == s[i - 1] == 'u' or s[i] == s[i - 1] == 'n':
			dp[2] = dp[1] + dp[0]
			dp[0] = dp[1]
			dp[1] = dp[2]
		else:
			dp[2] = dp[1]
			dp[0] = dp[1]
	print(dp[2] % (10 ** 9 + 7))


s = input().strip()
MOD = 1000000007
dp = [0] * (len(s) + 1)
dp[0] = 1
for i in range(len(s)):
	if s[i] == 'w' or s[i] == 'm':
		print(0)
		exit()
	dp[i + 1] = dp[i]
	if i != 0 and (s[i] == s[i - 1] and s[i] == 'u' or (s[i] == s[i - 1] and s[i] == 'n')):
		dp[i + 1] = (dp[i + 1] + dp[i - 1]) % MOD
print(dp[len(s)])


import re
from functools import reduce, lru_cache
M = int(1000000000.0 + 7)

@lru_cache(maxsize=None)
def w(n):
	if n < 5:
		return (1, 1, 2, 3, 5, 8)[n]
	a = n // 2
	b = n - a
	return (w(a) * w(b) + w(a - 1) * w(b - 1)) % M
s = input().strip()
if 'm' in s or 'w' in s:
	print(0)
else:
	s = [w(len(l)) for l in re.findall('u+|n+', s)]
	print(reduce(lambda a, b: a * b % M, s, 1))


import re

def fibonacci(n):
	a = 1
	b = 2
	if n < 0:
		print('Incorrect input')
	elif n == 0:
		return a
	elif n == 1:
		return a
	else:
		for i in range(2, n):
			c = (a + b) % 1000000007
			a = b
			b = c
		return b
s = input()
m = []
q = re.findall('(m+|w+)', s)
k = re.findall('(n+|u+)', s)
if len(q) > 0:
	print(0)
else:
	t = 1
	for i in k:
		t = t * fibonacci(len(i)) % 1000000007
	print(t)


s = input()
n = len(s)
mod = 10 ** 9 + 7
ans = 1
cnt = 0
if 'm' in s or 'w' in s:
	print(0)
	exit()
p = '?'
x = [0, 1]
for ss in s:
	if ss == p and ss in 'nu':
		x += [(x[-1] + x[-2]) % mod]
	else:
		x += [x[-1] % mod]
	p = ss
print(x[-1])


class Constanze:

	def __init__(self):
		self.cache = {1: 1, 2: 2}

	def determine_value(self, n: int):
		max_stored_in_cache = len(self.cache)
		if n > max_stored_in_cache:
			for i in range(max_stored_in_cache + 1, n + 1):
				self.cache[i] = self.cache[i - 1] + self.cache[i - 2]
		return self.cache[n]

def constanze(s: str) -> int:
	if 'm' in s or 'w' in s:
		return 0
	elif len(s) <= 1:
		return 1
	(dp1, dp2) = (1, 1)
	for i in range(1, len(s)):
		if s[i - 1] == s[i] and (s[i] == 'n' or s[i] == 'u'):
			t = dp1
			dp1 = dp1 + dp2
			dp2 = t
		else:
			dp2 = dp1
	return dp1 % 1000000007

def test():
	assert constanze('ouuokarinn') == 4
	assert constanze('banana') == 1
	assert constanze('nnn') == 3
	assert constanze('amanda') == 0
	assert constanze('a') == 1
	assert constanze('uuunnnuuunnn') == 81
s = input()
print(constanze(s))


a = input()
if 'w' in a or 'm' in a:
	print(0)
	exit()
p = 'TKD'
x = [0, 1]
mod = pow(10, 9) + 7
for i in a:
	if i == p and i in 'nu':
		x += [(x[-1] + x[-2]) % mod]
	else:
		x += [x[-1] % mod]
	p = i
print(x[-1])


from sys import stdin, stdout
mod = 10 ** 9 + 7
s = input().rstrip()
s = [i for i in s]
n = len(s)
dp = [0] * (n + 1)
if 'm' in s or 'w' in s:
	print(0)
	exit()
if len(s) == 2:
	if s[0] == 'u' and s[1] == 'u':
		print(2)
	elif s[0] == 'n' and s[0] == 'n':
		print(2)
	else:
		print(1)
	exit()
dp[0] = 1
dp[1] = 1
if len(s) > 2:
	if s[0] == s[1] and (s[0] == 'u' or s[0] == 'n'):
		dp[0] = 1
		dp[1] = 2
for i in range(2, len(s)):
	dp[i] = dp[i - 1]
	if s[i] == 'n' and s[i - 1] == 'n':
		dp[i] += dp[i - 2]
	if s[i] == 'u' and s[i - 1] == 'u':
		dp[i] += dp[i - 2]
	dp[i] = dp[i] % mod
print(dp[n - 1] % mod)


mod = int(1000000000.0 + 7)
fib = [1, 1]
for i in range(2, 100001):
	fib.append((fib[i - 1] % mod + fib[i - 2] % mod) % mod)
s = input()
n = len(s)
arr = []
flag = True
for i in s:
	if i == 'm' or i == 'w':
		print('0')
		flag = False
		break
i = 0
if flag:
	while i < n - 1:
		if s[i] == 'u':
			k = i
			cnt = 1
			for j in range(i + 1, n):
				if s[j] == 'u':
					cnt += 1
					k = j
				else:
					k = j
					break
			if cnt > 1:
				arr.append(cnt)
			i = k
		elif s[i] == 'n':
			k = i
			cnt = 1
			for j in range(i + 1, n):
				if s[j] == 'n':
					cnt += 1
					k = j
				else:
					k = j
					break
			if cnt > 1:
				arr.append(cnt)
			i = k
		else:
			i += 1
	if len(arr) == 0:
		print('1')
	else:
		ans = []
		for i in arr:
			ans.append(fib[i])
		temp = 1
		for i in ans:
			temp = temp % mod * i % mod % mod
		print(temp)


k = input()
s = []
m = 10 ** 9 + 7
for j in k:
	s.append(j)
flag = True
for i in range(len(s)):
	if s[i] == 'w' or s[i] == 'm':
		flag = False
		break
if not flag:
	print(0)
else:
	n = len(s)
	dp = [0] * (n + 1)
	dp[0] = 1
	dp[1] = 1
	for i in range(1, len(s)):
		if s[i] == s[i - 1]:
			if s[i] == 'u' or s[i] == 'n':
				dp[i + 1] = (dp[i] + dp[i - 1]) % m
			else:
				dp[i + 1] = dp[i] % m
		else:
			dp[i + 1] = dp[i] % m
	print(dp[n])


string = input()
sigma = [1]
spec = ['u', 'n']
unexpected_chars = ['m', 'w']
mod = 1000000000 + 7
if string[0] in unexpected_chars:
	print(0)
	exit(0)
for i in range(1, len(string)):
	if string[i] in unexpected_chars:
		print(0)
		exit(0)
	if string[i] in spec and string[i - 1] == string[i]:
		sigma.append((sigma[i - 1] + sigma[i - 2]) % mod)
	else:
		sigma.append(sigma[i - 1] % mod)
print(sigma[-1])


import sys
input = sys.stdin.readline
mod = 10 ** 9 + 7
dp = [1, 2, 3]
for i in range(10 ** 5):
	dp.append(dp[-2] + dp[-1])
	dp[-1] %= mod
s = input()
n = len(s)
ind = 0
cur = ''
x = 0
tot = 1
st = True
while ind < n:
	if s[ind] == 'u':
		if cur == 'n':
			tot *= dp[x - 1]
			tot %= mod
			cur = ''
			x = 0
		if cur == '':
			cur = 'u'
		x += 1
	elif s[ind] == 'n':
		if cur == 'u':
			tot *= dp[x - 1]
			tot %= mod
			cur = ''
			x = 0
		if cur == '':
			cur = 'n'
		x += 1
	elif cur != '':
		tot *= dp[x - 1]
		tot %= mod
		cur = ''
		x = 0
	if s[ind] == 'w' or s[ind] == 'm':
		st = False
	ind += 1
if cur != '':
	tot *= dp[x - 1]
	tot %= mod
if st:
	print(tot)
else:
	print(0)


s = input()
ans = 1
t = 0
pod = 0
mas = []
fib = [1, 2]
for i in range(100000):
	fib.append((fib[len(fib) - 1] + fib[len(fib) - 2]) % 1000000007)
if s[0] == 'n' or s[0] == 'u':
	pod = 1
if s[0] == 'w' or s[0] == 'm':
	print(0)
	exit()
for i in range(1, len(s)):
	if s[i] == s[i - 1] == 'u' or s[i] == s[i - 1] == 'n':
		pod += 1
	else:
		if pod != 0:
			mas.append(pod)
		pod = 0
		if s[i] == 'n' or s[i] == 'u':
			pod = 1
	if s[i] == 'm' or s[i] == 'w':
		print(0)
		exit()
if pod != 0:
	mas.append(pod)
for i in range(len(mas)):
	ans = ans * fib[mas[i] - 1] % 1000000007
print(ans)


def d(arr):
	n = len(arr)
	MOD = 1000000007
	dp = [0] * (n + 1)
	dp[0] = 1
	dp[1] = 1
	for i in arr:
		if i == 'w' or i == 'm':
			return 0
	for i in range(2, n + 1):
		dp[i] = dp[i - 1]
		if arr[i - 1] == arr[i - 2] and (arr[i - 1] == 'u' or arr[i - 1] == 'n'):
			dp[i] = (dp[i] + dp[i - 2]) % MOD
	return dp[-1]
print(d(list(input())))


word = list(input())
if 'm' in word or 'w' in word:
	print(0)
elif 'n' not in word and 'u' not in word:
	print(1)
else:
	n = len(word)
	dp = [0] * (n + 1)
	dp[0] = 1
	dp[1] = 1
	for i in range(2, n + 1):
		if word[i - 1] == word[i - 2] and (word[i - 1] == 'n' or word[i - 1] == 'u'):
			dp[i] = (dp[i - 1] + dp[i - 2]) % (10 ** 9 + 7)
		else:
			dp[i] = dp[i - 1]
	print(dp[n])


import math
import sys
from collections import defaultdict
from itertools import groupby
rt = lambda : map(int, input().split())
ri = lambda : int(input())
rl = lambda : list(map(int, input().split()))

def main():
	s = input()
	if 'w' in s or 'm' in s:
		print(0)
	else:
		MOD = 10 ** 9 + 7
		fib = [0] * (len(s) + 5)
		fib[2] = 2
		fib[3] = 3
		for i in range(4, len(fib)):
			fib[i] = (fib[i - 1] + fib[i - 2]) % MOD
		res = 1
		for (c, grp) in groupby(s):
			if c in 'un':
				size = len(list(grp))
				if size > 1:
					res = res * fib[size] % MOD
		print(res)
main()


from collections import Counter, defaultdict, deque
import sys, bisect, math, itertools, string, queue
from heapq import heappop, heappush
sys.setrecursionlimit(10 ** 8)
mod = 10 ** 9 + 7

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))

def inpl_str():
	return list(sys.stdin.readline().split())

def inpln(n):
	return list((int(sys.stdin.readline()) for i in range(n)))

def fib(n):
	if n <= 1:
		return n
	result = [1, 0, 0, 1]
	matrix = [1, 1, 1, 0]
	while n > 0:
		if n % 2:
			result = mul(matrix, result)
		matrix = mul(matrix, matrix)
		n //= 2
	return result[2]

def mul(a, b):
	return [a[0] * b[0] + a[1] * b[2], a[0] * b[1] + a[1] * b[3], a[2] * b[0] + a[3] * b[2], a[2] * b[1] + a[3] * b[3]]
s = input()
res = 1
aaa = []
tmp = ''
cntu = 0
cntn = 0
for (i, t) in enumerate(s):
	if t == 'w' or t == 'm':
		print(0)
		quit()
	if t == 'u':
		cntu += 1
		if cntn > 1:
			aaa.append(cntn)
		cntn = 0
	elif t == 'n':
		cntn += 1
		if cntu > 1:
			aaa.append(cntu)
		cntu = 0
	else:
		if cntn > 1:
			aaa.append(cntn)
		cntn = 0
		if cntu > 1:
			aaa.append(cntu)
		cntu = 0
if cntn > 1:
	aaa.append(cntn)
if cntu > 1:
	aaa.append(cntu)
for a in aaa:
	res *= fib(a + 1)
	res %= mod
print(res)


import math
fibo = [1, 1, 2]
M = 10 ** 9 + 7
for i in range(3, 100001):
	fibo += [(fibo[i - 1] + fibo[i - 2]) % M]
s = list(input())
check = [True] * len(s)
cnt = 1
for i in range(len(s)):
	if s[i] == 'u' and check[i]:
		t = 0
		j = i
		while j < len(s) and s[j] == 'u':
			check[j] = False
			t += 1
			j += 1
		cnt = cnt * fibo[t] % M
	if s[i] == 'n' and check[i]:
		t = 0
		j = i
		while j < len(s) and s[j] == 'n':
			check[j] = False
			t += 1
			j += 1
		cnt = cnt * fibo[t] % M
	if s[i] == 'm' or s[i] == 'w':
		cnt = 0
		break
print(cnt)


MOD = 10 ** 9 + 7

def solve(s):
	if any((x == 'm' for x in s)):
		return 0
	if any((x == 'w' for x in s)):
		return 0
	dp = [0 for _ in range(len(s))]
	dp[0] = 1
	for i in range(1, len(s)):
		dp[i] = dp[i - 1]
		if s[i - 1] == s[i] == 'u':
			dp[i] += dp[i - 2] if i >= 2 else 1
		if s[i - 1] == s[i] == 'n':
			dp[i] += dp[i - 2] if i >= 2 else 1
		dp[i] %= MOD
	return dp[-1]
print(solve(input()))


m = 10 ** 9 + 7

def fib(n):
	a = 1
	b = 2
	if n == 1:
		return a
	elif n == 2:
		return b
	else:
		for i in range(2, n):
			c = (a + b) % m
			a = b % m
			b = c % m
		return b
s = input()
if 'w' in s or 'm' in s:
	print('0')
else:
	i = 0
	a = 1
	l = len(s)
	try:
		while True:
			if s[i] == 'u':
				c = 0
				while s[i] == 'u':
					c += 1
					i += 1
				a = a * fib(c) % m
			elif s[i] == 'n':
				c = 0
				while s[i] == 'n':
					c += 1
					i += 1
				a = a * fib(c) % m
			else:
				i += 1
	except IndexError:
		if s[l - 1] == 'u' or s[l - 1] == 'n':
			a = a * fib(c) % m
	print(a)


import sys
import io
import math
import collections
import decimal
import itertools
import bisect
import heapq

def input():
	return sys.stdin.readline()[:-1]
MOD = 1000000007

def solve(S):
	S = S + ' '
	i_u = -1
	i_n = -1
	L = []
	for i in range(len(S)):
		if S[i] == 'm' or S[i] == 'w':
			return 0
		if S[i] == 'u':
			if i_u == -1:
				i_u = i
		else:
			if i_u != -1 and i - i_u >= 2:
				L.append(i - i_u)
			i_u = -1
		if S[i] == 'n':
			if i_n == -1:
				i_n = i
		else:
			if i_n != -1 and i - i_n >= 2:
				L.append(i - i_n)
			i_n = -1
	if not L:
		return 1
	L.sort()
	dp = [0, 1, 2]
	for i in range(3, L[-1] + 1):
		dp.append((dp[i - 1] + dp[i - 2]) % MOD)
	ans = 1
	for l in L:
		ans = ans * dp[l] % MOD
	return ans

def main():
	S = input()
	n = solve(S)
	print(n)
main()


mod = 10 ** 9 + 7

def cmb(n, r, mod=mod):
	if r < 0 or r > n:
		return 0
	r = min(r, n - r)
	return g1[n] * g2[r] * g2[n - r] % mod
NN = 10 ** 5
g1 = [1, 1]
g2 = [1, 1]
inverse = [0, 1]
for i in range(2, NN + 1):
	g1.append(g1[-1] * i % mod)
	inverse.append(-inverse[mod % i] * (mod // i) % mod)
	g2.append(g2[-1] * inverse[-1] % mod)
import sys
input = sys.stdin.readline
S = input().rstrip()
N = len(S)
pre = '-1'
ans = 1
A = []
c = 0
for s in S:
	if s == 'm' or s == 'w':
		ans = 0
		break
	if s == 'n':
		if pre == 'n':
			c += 1
		else:
			if c > 1:
				A.append(c)
			c = 1
	elif s == 'u':
		if pre == 'u':
			c += 1
		else:
			if c > 1:
				A.append(c)
			c = 1
	else:
		if c > 1:
			A.append(c)
		c = 0
	pre = s
A.append(c)
if ans == 0:
	print(0)
else:
	for a in A:
		tmp = 1
		(n, m) = (a - 1, 1)
		while n >= m:
			tmp += cmb(n, m)
			tmp %= mod
			n -= 1
			m += 1
		ans = ans * tmp % mod
	print(ans)


str = input()
counter = []
n_num_lst = []
u_num_lst = []

def count(num):
	tmp = []
	for i in range(num + 1):
		if i == 0 or i == 1:
			tmp.append(0)
		elif i == 2:
			tmp.append(1)
		elif i >= 3:
			tmp.append((tmp[i - 2] * 2 + tmp[i - 3] + 2) % (1000000000 + 7))
		else:
			assert 0
	for i in range(num + 1):
		if i >= 2:
			tmp[i] += 1
	return tmp
i = 0
more_than_two = 0
while i < len(str):
	flag = 0
	n_num = 0
	u_num = 0
	if str[i] == 'w' or str[i] == 'm':
		flag = 1
		print(0)
		break
	elif str[i] == 'n':
		n_num += 1
		while 1:
			if i + n_num < len(str) and str[i + n_num] == 'n':
				n_num += 1
			else:
				break
		if n_num >= 2:
			more_than_two = 1
			n_num_lst.append(n_num)
		i += n_num
		continue
	elif str[i] == 'u':
		u_num += 1
		while 1:
			if i + u_num < len(str) and str[i + u_num] == 'u':
				u_num += 1
			else:
				break
		if u_num >= 2:
			more_than_two = 1
			u_num_lst.append(u_num)
		i += u_num
		continue
	else:
		i += 1
if not flag:
	if not more_than_two:
		print(1)
	else:
		combination = count(max(n_num_lst + u_num_lst))
		for l in n_num_lst:
			counter.append(combination[l])
		for l in u_num_lst:
			counter.append(combination[l])
		out = 1
		for c in counter:
			out *= c
		print(out % (1000000000 + 7))


def count(x):
	if x == 2:
		return 2
	elif x == 3:
		return 3
	else:
		a1 = 2
		a2 = 3
		for i in range(x - 3):
			(a1, a2) = (a2, a1 + a2)
		return a2
s = input() + 'a'
a = []
n = 0
crutch = False
i = 0
while i <= len(s) - 1:
	if s[i] in ['w', 'm']:
		crutch = True
		break
	k = 1
	while i < len(s) - 1 and s[i] == 'n' and (s[i + 1] == 'n'):
		k += 1
		i += 1
	if k != 1:
		a.append(k)
		n += 1
	k = 1
	while i < len(s) - 1 and s[i] == 'u' and (s[i + 1] == 'u'):
		k += 1
		i += 1
	if k != 1:
		a.append(k)
		n += 1
	i += 1
if crutch:
	print(0)
else:
	ans = 1
	for i in range(n):
		ans *= count(a[i])
	print(ans % 1000000007)


import sys
from math import *
import threading
from itertools import count
from pprint import pprint
from collections import defaultdict
from heapq import heapify, heappop, heappush
sys.setrecursionlimit(300000)
mod = 10 ** 9 + 7
inf = 10 ** 15
decision = ['NO', 'YES']
yes = 'YES'
no = 'NO'
import os
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def npr(n, r):
	return factorial(n) // factorial(n - r) if n >= r else 0

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(n - r)) if n >= r else 0

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val):
	ans = -1
	lb = 0
	ub = len(li) - 1
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = mid
			break
	return ans

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def pref(li):
	pref_sum = [0]
	for i in li:
		pref_sum.append(pref_sum[-1] + i)
	return pref_sum

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	li = []
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, len(prime)):
		if prime[p]:
			li.append(p)
	return li

def primefactors(n):
	factors = []
	while n % 2 == 0:
		factors.append(2)
		n //= 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			factors.append(i)
			n //= i
	if n > 2:
		factors.append(n)
	return factors

def prod(li):
	ans = 1
	for i in li:
		ans *= i
	return ans
for _ in range(1):
	s = list(input())
	f = 1
	n = len(s)
	for i in range(n):
		if s[i] == 'm' or s[i] == 'w':
			f = 0
	if not f:
		print(0)
	else:
		dp = [0 for i in range(n + 1)]
		dp[0] = 1
		dp[1] = 1
		for i in range(2, n + 1):
			if s[i - 1] == 'u' and s[i - 2] == 'u':
				dp[i] = (dp[i - 1] + dp[i - 2]) % mod
			elif s[i - 1] == 'n' and s[i - 2] == 'n':
				dp[i] = (dp[i - 1] + dp[i - 2]) % mod
			else:
				dp[i] = dp[i - 1]
		print(dp[-1])


def f(n):
	global mod
	m = len(x)
	if m >= n:
		return x[n - 1]
	for i in range(n - m):
		x.append((x[-1] + x[-2]) % mod)
	return x[-1]
s = input()
k = len(s)
x = [1, 2, 3, 5, 8]
ans = 1
i = 0
mod = 10 ** 9 + 7
while i < k:
	t = s[i]
	if t == 'w' or t == 'm':
		ans = 0
		break
	elif t == 'u' or t == 'n':
		t1 = 1
		j = i + 1
		while j < k:
			if s[j] == t:
				t1 += 1
			else:
				break
			j += 1
		ans = ans * f(t1) % mod
		i = j
	else:
		i += 1
print(ans)


s = input().strip()
flag = True
count = 0
mod = 10 ** 9 + 7
dp = [0] * (len(s) + 1)
dp[0] = 1
dp[1] = 1
for c in s:
	if c == 'm' or c == 'w':
		print(0)
		flag = False
		break
if flag:
	for i in range(2, len(s) + 1):
		dp[i] = dp[i - 1]
		if s[i - 1] == s[i - 2] and (s[i - 1] == 'u' or s[i - 1] == 'n'):
			dp[i] = (dp[i] + dp[i - 2]) % mod
	print(dp[len(s)])


s = input()
if 'm' in s or 'w' in s:
	print(0)
else:
	n = len(s)
	a = 1
	b = 1
	c = 1
	for i in range(1, n):
		if s[i] == s[i - 1] and (s[i] == 'u' or s[i] == 'n'):
			c = a + b
			(a, b) = (b, c)
		else:
			c = b
			(a, b) = (b, c)
	print(c % 1000000007)


from collections import defaultdict
from sys import setrecursionlimit

def dp():
	mem[0] = mem[1] = 1
	for i in range(2, n + 1):
		mem[i] = mem[i - 1] % 1000000007
		if s[i - 1] == s[i - 2] == 'u' or s[i - 1] == s[i - 2] == 'n':
			mem[i] = (mem[i] + mem[i - 2]) % 1000000007
	return mem[n]
s = input()
(n, mem) = (len(s), defaultdict(lambda : -1))
if s.count('m') > 0 or s.count('w') > 0:
	print(0)
else:
	print(dp())


def rint():
	return int(input())

def rints():
	return list(map(int, input().split()))
from itertools import groupby
M = 10 ** 9 + 7
s = input()
r = 1
f = [1, 1]
for (k, g) in groupby(s):
	if k in 'wm':
		print(0)
		exit(0)
	if k not in 'nu':
		continue
	l = sum((1 for _ in g))
	while len(f) <= l:
		f.append((f[-1] + f[-2]) % M)
	r = r * f[l] % M
print(r)


def main():
	MOD = 1000000007
	MAX_CNT = 100005
	ans = 1
	dp = [0] * MAX_CNT
	dp[0] = 1
	dp[1] = 2
	for i in range(2, MAX_CNT):
		dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
	s = input()
	if s.count('m') or s.count('w'):
		print('0')
		return
	i = 0
	while i < len(s):
		if s[i] == 'n' or s[i] == 'u':
			j = i + 1
			cnt = 0
			while j < len(s):
				if s[i] == s[j]:
					cnt += 1
					j = j + 1
				else:
					break
			i = j
			ans = ans * dp[cnt] % MOD
		else:
			i = i + 1
	print(ans)
main()


big = 1000000007
s = input()
dp = 100069 * [0]
dp[1] = 1
dp[2] = 2
for i in range(3, 100042):
	dp[i] = (dp[i - 1] + dp[i - 2]) % big
ans = 1
i = 0
while i < len(s):
	if s[i] in ['m', 'w']:
		print(0)
		exit(0)
	elif s[i] in ['n', 'u']:
		j = i + 1
		while j < len(s) and s[j] == s[i]:
			j += 1
		ans = ans * dp[j - i] % big
		i = j - 1
	i += 1
print(ans)


s = list(input())
m = 10 ** 9 + 7
c = 0
for i in s:
	if i == 'm' or i == 'w':
		print(0)
		c = 1
		break
if c == 0:
	n = len(s)
	dp = [0] * (n + 1)
	dp[0] = 1
	dp[1] = 1
	for i in range(1, len(s)):
		dp[i + 1] = dp[i]
		if s[i] == s[i - 1]:
			if s[i] == 'u' or s[i] == 'n':
				dp[i + 1] = (dp[i + 1] + dp[i - 1]) % m
	print(dp[-1])


import math
fact = [1]
mod = 1000000007

def inv(a):
	return pow(a, mod - 2, mod)

def ch(a, b):
	ret = fact[a]
	ret *= inv(fact[b])
	ret *= inv(fact[a - b])
	return ret % mod
for i in range(1, 100005):
	fact.append(i * fact[-1] % mod)
word = input() + '1'
if 'm' in word or 'w' in word:
	print(0)
	exit()
r = False
cnt = 0
cur = '0'
d = []
for w in word:
	if w == cur:
		cnt += 1
	else:
		if r:
			d.append(cnt)
			cnt = 0
			r = False
		if w in 'un':
			cur = w
			r = True
			cnt = 1
		else:
			cur = '0'
anss = 1
for dd in d:
	ans = 0
	for i in range(dd // 2 + 1):
		ans = (ans + ch(dd - i, i)) % mod
	anss = anss * ans % mod
print(anss)


import math
mod = 10 ** 9 + 7
a = input()
y = len(a)
if 'w' in a or 'm' in a:
	print(0)
	exit()
else:
	fib = [1, 1]
	for i in range(2, y + 2):
		fib.append((fib[i - 1] % mod + fib[i - 2] % mod) % mod)
	l = 1
	k = 1
	for i in range(1, y):
		if a[i] == a[i - 1] and (a[i] == 'n' or a[i] == 'u'):
			k += 1
		else:
			l = l % mod * (fib[k] % mod) % mod
			k = 1
	l = l % mod * (fib[k] % mod) % mod
	print(l)


MOD = 10 ** 9 + 7
f = [0, 1, 2]
for i in range(10 ** 5 + 10):
	f.append((f[-1] + f[-2]) % MOD)
s = input()
if 'm' in s or 'w' in s:
	print(0)
else:
	ans = 1
	seq = ''
	ss = 0
	for i in s:
		if seq != '' and i != seq:
			ans = ans * f[ss] % MOD
			seq = ''
			ss = 0
		if i == 'u' or i == 'n':
			if seq != i:
				seq = i
				ss = 0
			ss += 1
	if ss:
		ans = ans * f[ss] % MOD
	print(ans)


s = input()
i = 0
ans = []
final = [1, 2, 3]
for i in range(4, 100000):
	final.append((2 * final[i - 3] + final[i - 4]) % (10 ** 9 + 7))
i = 0
flag = 0
while i <= len(s) - 1:
	if s[i] == 'm' or s[i] == 'w':
		print(0)
		flag = 1
		break
	elif s[i] == 'n':
		count = 0
		while s[i] == 'n':
			i = i + 1
			count = count + 1
			if i == len(s):
				break
		ans.append(final[count - 1])
	elif s[i] == 'u':
		count = 0
		while s[i] == 'u':
			i = i + 1
			count = count + 1
			if i == len(s):
				break
		ans.append(final[count - 1])
	else:
		i = i + 1
total = 1
for i in range(len(ans)):
	total = total % (10 ** 9 + 7) * (ans[i] % (10 ** 9 + 7)) % (10 ** 9 + 7)
if flag == 0:
	print(total)


import sys

def fun():
	(res, cnt1, cnt2) = (1, 0, 0)
	for x in sys.stdin.readline()[:-1]:
		if x == 'm' or x == 'w':
			print(0)
			return
		if x == 'u':
			cnt1 += 1
		else:
			res *= dp[cnt1]
			res %= mod
			cnt1 = 0
		if x == 'n':
			cnt2 += 1
		else:
			res *= dp[cnt2]
			res %= mod
			cnt2 = 0
	res = res * dp[max(cnt1, cnt2)] % mod
	print(res)
mod = 10 ** 9 + 7
dp = [1, 1]
for i in range(10 ** 5 + 10):
	dp.append((dp[-1] + dp[-2]) % mod)
fun()


s = input()
n = len(s)
f = [1, 1]
for i in range(n):
	f.append((f[-1] + f[-2]) % 1000000007)
t = 0 if s[0] == 'm' or s[0] == 'w' else 1
c = 1
for i in range(1, n):
	if s[i] == s[i - 1] and (s[i] == 'u' or s[i] == 'n'):
		c += 1
	elif s[i] == 'm' or s[i] == 'w':
		t = 0
	else:
		t = t * f[c] % 1000000007
		c = 1
print(t * f[c] % 1000000007)


mod = 1000000007
s = input()
dp = list()
dp.append(1)
dp.append(1)
dp.append(2)
for i in range(3, 100005):
	dp.append((dp[i - 1] + dp[i - 2]) % mod)
curr = 1
ans = list()
for i in range(1, len(s)):
	if s[i] == s[i - 1] and s[i] == 'u':
		curr += 1
	elif s[i] == s[i - 1] and s[i] == 'n':
		curr += 1
	else:
		if curr >= 2:
			ans.append(curr)
		curr = 1
flag = 0
for i in range(len(s)):
	if s[i] == 'm' or s[i] == 'w':
		flag = 1
if flag == 1:
	print(0)
else:
	if curr > 1:
		ans.append(curr)
	if len(ans) == 0:
		print(1)
	else:
		ll = 1
		for i in range(len(ans)):
			ll = ll * dp[ans[i]] % mod
		print(ll)


st = input()
if 'w' in st or 'm' in st:
	print(0)
elif len(st) <= 1:
	print(1)
else:
	(dp1, dp2) = (1, 1)
	for i in range(1, len(st)):
		if st[i - 1] == st[i] and (st[i] == 'n' or st[i] == 'u'):
			t = dp1
			dp1 = dp1 + dp2
			dp2 = t
		else:
			dp2 = dp1
	print(dp1 % (10 ** 9 + 7))


s = input()
dp = [1, 1]
cant = False
if 'w' in s or 'm' in s:
	cant = True
for i in range(1, len(s)):
	if s[i] + s[i - 1] == 'uu' or s[i] + s[i - 1] == 'nn':
		dp.append((dp[-1] + dp[-2]) % (10 ** 9 + 7))
	else:
		dp.append(dp[-1])
if cant:
	print(0)
else:
	print(dp[-1])


s = input()
n = len(s)
dp = [0] * (10 ** 5 + 1)
dp[0] = 0
dp[1] = 1
dp[2] = 2
md = 10 ** 9 + 7
for i in range(3, 10 ** 5 + 1):
	dp[i] = (dp[i - 1] + dp[i - 2]) % md
l = []
i = 0
while i < n:
	if s[i] == 'u':
		j = i
		while j < n and s[j] == 'u':
			j += 1
		l.append(j - i)
		i = j
	elif s[i] == 'n':
		j = i
		while j < n and s[j] == 'n':
			j += 1
		l.append(j - i)
		i = j
	else:
		i += 1
ans = 1
for x in l:
	ans = ans * dp[x] % md
if 'm' in s or 'w' in s:
	print(0)
else:
	print(ans)


from itertools import groupby
fib = [0] * 100005
fib[0] = fib[1] = 1
for i in range(2, 100005):
	fib[i] = (fib[i - 1] + fib[i - 2]) % 1000000007
s = input()
res = 1
for (k, g) in groupby(s):
	if k == 'u' or k == 'n':
		res = fib[len(list(g))] * res % 1000000007
	elif k == 'm' or k == 'w':
		res = -1
		break
print(res if res != -1 else 0)


def fibo(N):
	a0 = 0
	a1 = 1
	arr = [0]
	for i in range(N):
		temp = a1 + a0
		a0 = a1
		a1 = temp
		arr.append(a1)
	return arr

def fibo_append(arr, N):
	a0 = arr[-2]
	a1 = arr[-1]
	for i in range(N):
		temp = a1 + a0
		a0 = a1
		a1 = temp % 1000000007
		arr.append(a1)
	return arr

def check_Consec(s, n):
	ctr = 0
	while s[n + 1] == s[n]:
		ctr += 1
		n += 1
	return ctr
s = input()
s = ' ' + s + ' '
total = 1
i = 0
fibo_arr = fibo(3)
while i < len(s) - 1:
	char = s[i]
	if char == 'm' or char == 'w':
		total = 0
		break
	if char == 'n' or char == 'u':
		count = check_Consec(s, i) + 1
		l = len(fibo_arr)
		if count >= l:
			fibo_arr = fibo_append(fibo_arr[:], count - l + 1)
		total = total * fibo_arr[count] % 1000000007
		i += count
	else:
		i += 1
print(total)


from sys import exit
a = input()
b = [0] * 10000000
b[0] = b[1] = 1
m = 1000000000.0 + 7
for i in range(len(a)):
	b[i + 1] = b[i]
	if a[i] == 'm' or a[i] == 'w':
		exit(print(0))
	if a[i] == 'n' and a[i - 1] == 'n' or (a[i] == 'u' and a[i - 1] == 'u'):
		b[i + 1] = (b[i] + b[i - 1]) % m
print(int(b[len(a)]))


need = 10 ** 9 + 7
string = input()
if 'w' in string or 'm' in string:
	print(0)
else:
	size = len(string)
	dp = [1 for i in range(size + 1)]
	for i in range(2, size + 1):
		if string[i - 1] == string[i - 2] and (string[i - 1] == 'u' or string[i - 1] == 'n'):
			dp[i] = (dp[i - 2] + dp[i - 1]) % need
		else:
			dp[i] = dp[i - 1]
	print(dp[size])


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
import collections
from itertools import permutations
from collections import defaultdict
import threading
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
s = input()
MOD = 10 ** 9 + 7
if 'm' in s or 'w' in s:
	print(0)
	exit()
dp = [1, 1]
for i in range(2, len(s) + 1):
	if s[i - 1] == s[i - 2] and s[i - 1] in ['n', 'u']:
		dp.append((dp[-1] + dp[-2]) % MOD)
	else:
		dp.append(dp[-1])
print(dp[-1])


t = 1
import math
mod = int(10 ** 9 + 7)
while t > 0:
	t -= 1
	s = input()
	l = []
	l[:0] = s
	s = l
	ans = True
	for x in s:
		if x == 'w' or x == 'm':
			ans = False
	if not ans:
		print('0')
		continue
	n = len(s)
	dp = [int(0) for i in range(0, n + 2)]
	dp[0] = 1
	dp[1] = 1
	for i in range(2, n + 1):
		dp[i] = dp[i - 1]
		if s[i - 1] == s[i - 2] and (s[i - 1] == 'u' or s[i - 1] == 'n'):
			dp[i] = (dp[i] + dp[i - 2]) % mod
	print(dp[n])


import sys
readline = sys.stdin.readline
rdw = lambda : readline().rstrip()
rdws = lambda : readline().split()
rdwl = lambda : list(readline().split())
rdi = lambda : int(readline())
rdis = lambda : map(int, readline().split())
rdil = lambda : list(map(int, readline().split()))
rdilrows = lambda cnt: [rdil() for _ in range(cnt)]

def solve():
	mod = 10 ** 9 + 7
	res = 1
	s = rdw()
	n = 0
	Ok = True
	(en, eu) = (0, 0)
	for i in range(len(s)):
		if s[i] == 'm' or s[i] == 'w':
			Ok = False
			break
		if s[i] == 'n':
			eu = 0
			if en == 0:
				en = res
			else:
				nen = res
				res = (res + en) % mod
				en = nen % mod
		elif s[i] == 'u':
			en = 0
			if eu == 0:
				eu = res
			else:
				neu = res
				res = (res + eu) % mod
				eu = neu % mod
		else:
			en = 0
			eu = 0
	if not Ok:
		res = 0
	print(res)
tests = 1
for testnum in range(tests):
	solve()


s = input()
if s[0] == 'w' or s[0] == 'm':
	from sys import exit
	print(0)
	exit()
(result, res, cout, summa) = (1, 0, [1, 1], 2)
for (i, x) in enumerate(s[1:]):
	if x == 'm' or x == 'w':
		result = 0
		break
	if x == s[i] == 'u' or x == s[i] == 'n':
		res = (summa + 1 - cout[-1]) % 1000000007
		summa += res
		summa = summa % 1000000007
		cout.append(res)
	elif x == 'u' or x == 'n':
		result = result * max(1, res) % 1000000007
		(res, cout, summa) = (0, [1, 1], 2)
result = result * max(1, res) % 1000000007
print(result)


import os
import sys
input_user = input()
nano = len(input_user)
pick = [1, 1]
for i in range(nano):
	pick.append((pick[-1] + pick[-2]) % 1000000007)
qwe = 0 if input_user[0] == 'm' or input_user[0] == 'w' else 1
click = 1
for i in range(1, nano):
	if input_user[i] == input_user[i - 1] and (input_user[i] == 'u' or input_user[i] == 'n'):
		click += 1
	elif input_user[i] == 'm' or input_user[i] == 'w':
		qwe = 0
	else:
		qwe = qwe * pick[click] % 1000000007
		click = 1
print(qwe * pick[click] % 1000000007)


import sys
readline = sys.stdin.readline
s = readline()
tmp = [1 for _ in range(100001)]
for i in range(2, 100001):
	tmp[i] = (tmp[i - 1] + tmp[i - 2]) % 1000000007
asd = []
m = 0
w = 0
ans = 1
for c in s:
	if c == 'n':
		m += 1
	else:
		if m > 1:
			asd.append(m)
		m = 0
	if c == 'u':
		w += 1
	else:
		if w > 1:
			asd.append(w)
		w = 0
	if c == 'w' or c == 'm':
		ans = -1
if ans == -1:
	print(0)
else:
	for c in asd:
		ans = tmp[c] * ans % 1000000007
	print(ans)


S = '1' + input() + '1'
mod = 10 ** 9 + 7

def mul(a, b):
	return [a[0] * b[0] + a[1] * b[2], a[0] * b[1] + a[1] * b[3], a[2] * b[0] + a[3] * b[2], a[2] * b[1] + a[3] * b[3]]

def fib2(n):
	n += 1
	if n <= 1:
		return n
	result = [1, 0, 0, 1]
	matrix = [1, 1, 1, 0]
	while n > 0:
		if n % 2:
			result = mul(matrix, result)
		matrix = mul(matrix, matrix)
		n //= 2
	return result[2] % mod
ans = 1
prev = '0'
mod = 10 ** 9 + 7
cnt = 1
for s in S:
	if s == prev and s == 'u':
		cnt += 1
	elif s == prev and s == 'n':
		cnt += 1
	elif s == 'm' or s == 'w':
		cnt = 0
		ans *= cnt
	else:
		if cnt > 1:
			m = fib2(cnt)
			ans *= m % mod
		cnt = 1
	prev = s
print(ans % mod)


mod = 10 ** 9 + 7
import math

def solve():
	s = input()
	s = list(s)
	n = len(s)
	if 'm' in s or 'w' in s:
		print(0)
		return
	else:
		poss = []
		temp = 0
		var = 0
		pas = [1, 2]
		for i in range(n):
			if s[i] == 'u':
				if temp == 0:
					var = 1
				elif temp == 1:
					var = 2
				else:
					var = 0
					var = (pas[0] + pas[1]) % mod
					pas[0] = pas[1]
					pas[1] = var
				temp += 1
			else:
				if temp > 1:
					poss.append(var % mod)
				temp = 0
				pas = [1, 2]
				var = 0
		if temp > 1:
			poss.append(var)
		temp = 0
		pas = [1, 2]
		for i in range(n):
			if s[i] == 'n':
				if temp == 0:
					var = 1
				elif temp == 1:
					var = 2
				else:
					var = 0
					var = (pas[0] + pas[1]) % mod
					pas[0] = pas[1]
					pas[1] = var
				temp += 1
			else:
				if temp > 1:
					poss.append(var)
				temp = 0
				pas = [1, 2]
				var = 0
		if temp > 1:
			poss.append(var % mod)
		ans = 1
		if len(poss) == 0:
			poss.append(1)
		for i in poss:
			ans = ans * i % mod
		print(ans % mod)
		return
t = 1
while t:
	solve()
	t -= 1


import os
import heapq
import sys
import math
from collections import defaultdict
from io import BytesIO, IOBase

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def main():
	mod = 10 ** 9 + 7
	st = input()
	counter = 0
	for i in range(len(st)):
		if st[i] == 'm' or st[i] == 'w':
			counter = 1
			break
	if counter == 1:
		print(0)
	else:
		dp = [1, 1]
		for i in range(2, 10 ** 5 + 1):
			dp.append((dp[i - 1] + dp[i - 2]) % mod)
		u = []
		n = []
		for i in range(len(st)):
			if st[i] == 'u':
				u.append(i)
			if st[i] == 'n':
				n.append(i)
		res = []
		if len(u) > 0:
			l = u[0]
			r = u[0]
			for i in range(1, len(u)):
				if u[i] - 1 == u[i - 1]:
					r = u[i]
				else:
					res.append(r - l + 1)
					l = u[i]
					r = u[i]
			res.append(r - l + 1)
		if len(n) > 0:
			l = n[0]
			r = n[0]
			for i in range(1, len(n)):
				if n[i] - 1 == n[i - 1]:
					r = n[i]
				else:
					res.append(r - l + 1)
					l = n[i]
					r = n[i]
			res.append(r - l + 1)
		ans = 1
		for i in range(len(res)):
			ans = ans * dp[res[i]] % mod % mod
		print(ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


l = list(input())
m = 1000000007
c = 0
for i in l:
	if i == 'm' or i == 'w':
		print(0)
		c = 1
		break
if c == 0:
	dp = [0] * (len(l) + 1)
	dp[0] = 1
	dp[1] = 1
	for i in range(2, len(l) + 1):
		dp[i] = dp[i - 1]
		if l[i - 1] == l[i - 2] and (l[i - 1] == 'u' or l[i - 1] == 'n'):
			dp[i] = (dp[i] + dp[i - 2]) % m
	print(dp[-1])