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: interview

Starter code:

Solutions:
from itertools import groupby

s = input()
n = len(s)

if "w" in s or "m" in s:
	print("0")
	return

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)

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


###############################################################################
# AUXILIARY FUNCTIONS

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()

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 sys
# input = sys.stdin.readline
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)

s=input()
if "m" in s or "w" in s:
    print(0)
    quit()
Fib=[1,1]
MOD=int(1e9+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)

S = '*' + input()

if 'm' in S or 'w' in S:
    print(0)
    return

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)


'''
Created on 2019. 9. 21.

@author: kkhh88
'''
#q = int(input())
#x, y = map(int,input().split(' '))

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)

    


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)



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)
        
        


"""T=int(input())
for _ in range(0,T):
    N=int(input())
    a,b=map(int,input().split())
    s=input()
    s=[int(x) for x in input().split()]
    for i in range(0,len(s)):
        a,b=map(int,input().split())"""


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)
    #print(g)
    dp=[0,1,2,3]
    ggg=10
    if(len(g)>0):
        ggg=max(g)+10
    else:
        ggg=10
    for i in range(ggg):
        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)


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)
    return
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)



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()
                


                
                
                
                
                
            
            
            
                    
                


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)


import sys
M = int( 1e9 ) + 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 )


MOD = 10**9+7

s = input()
n = len(s)

if s.count('m') > 0 or s.count('w') > 0:
    print('0')
    return

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)
#print(us, ns)
ans = 1
for usi in us:
    ans = (ans*dp[usi]) % MOD
for nsi in ns:
    ans = (ans*dp[nsi]) % MOD
print(ans)

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)])
    
    
    
        


u = list(input())
q = int(1e9) + 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
#print(dp)
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)










    



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)
        return
    else:
        i += 1
    ans %= mod
print(ans%mod)


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']:
        print(0);return
    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])



# -*- coding: utf-8 -*-

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])


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
    #print(local_ans)
    return local_ans

ans = 1
s = input()
if s.count('w') or s.count('m'):
    print(0)
else:
    print(f('u') * f('n') % M)



from pprint import pprint
mod = int(1e9) + 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

	# pprint(dp)
	print((dp[-1][0] + dp[-1][1] + 1) % mod)

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():
    # n = getN()
    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)
    # print(nst, mst)


    return


def main():
    # q = getN()
    # for _ in range(q):
    solve()

def __starting_point():
    main()
__starting_point()

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)