#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	string s, token = "0";
	cin >> s;
	token.append(s);
	ll i, n, j;
	n = token.length() - 1;
	for (i = 1; i <= n; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << "0";
			return 0;
		}
	}

	ll dp[100000 + 15] = { 0 };
	ll ans = 1;
	dp[0] = dp[1] = 1;
	for (i = 2; i <= 100000 + 1; i++)
		dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007;

	for (i = 1; i <= n; i++)
	{
		if (token[i] == 'u')
		{
			j = i;
			while (token[j] == 'u')
				j++;
			ans = (ans * dp[j - i]) % 1000000007;
			i = j - 1;
		}
		if (token[i] == 'n')
		{
			j = i;
			while (token[j] == 'n')
				j++;
			ans = (ans * dp[j - i]) % 1000000007;
			i = j - 1;
		}
	}
	cout << ans;

	return 0;

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	char s[100000 + 5],token[100000 + 5];
	ll i,j,lnt;
	gets_s(s);
	stack <ll> location;
	i = 0;
	j = 1;
	while (s[i] != '\0')
	{
		token[j] = s[i];
		i++;
		j++;
	}

	lnt = i;

	if (token[1] == 'm' || token[1] == 'w')
	{
		cout << 0;
		return 0;
	}

	for (i = 2; i <= lnt; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << 0;
			return 0;
		}

		if (token[i] == 'u' && token[i - 1] == 'u')
			location.push(i);
		if (token[i] == 'n' && token[i - 1] == 'n')
			location.push(i);
	}

	ll tmp, arr[100000 + 5] = { -2 } , size;
	ll ans = 1;
	size = location.size();
	i = 1;
	while (location.empty() != true)
	{
		arr[i] = location.top();
		location.pop();
		i++;
	}

	//for (i = 1; i < size; i++)
		//debug(arr[i]);

	for (i = 1; i <= size; i++)
	{
		if (arr[i] - arr[i + 1] >= 2)
		{
			ans = (ans * 2) % 1000000007;
		}
		else {
			ans = (ans * 3) % 1000000007;
			i++;
		}
	}

	cout << ans;

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	const int maxn = 1e5 + 14, mod = 1e9 + 7;
	int n, fib[maxn];

	fib[0] = fib[1] = 1;
	for (int i = 2; i < maxn; i++)
		fib[i] = (fib[i - 1] + fib[i - 2]) % mod;
	string s;
	cin >> s;
	n = s.size();
	if (s.find('m') != -1 || s.find('w') != -1)
		return cout << "0\n", 0;
	int ans = 1;
	for (int i = 0, j = 0; i < n; i = j) {
		while (j < n && s[j] == s[i])
			j++;
		if (s[i] == 'n' || s[i] == 'u')
			ans = (ll)ans * fib[j - i] % mod;
	}
	cout << ans << '\n';

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	string s, token = "0";
	cin >> s;
	token.append(s);
	ll i, n, j;
	n = token.length() - 1;
	for (i = 1; i <= n; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << "0";
			return 0;
		}
	}

	const int mod = 1e9 + 7;

	int dp[100000 + 15] = { 0 };
	ll ans = 1;
	dp[0] = dp[1] = 1;
	for (int t = 2; t <= 100000 + 1; t++)
		dp[t] = (dp[t - 1] + dp[t - 2]) % mod;

	//debug(dp[n]);

	for (i = 1; i <= n; i++)
	{
		if (token[i] == 'u')
		{
			j = i;
				while (token[j] == 'u')
					j++;
			ans = (ans * dp[j - i]) % mod;
			i = j - 1;
		}
		if (token[i] == 'n')
		{
			j = i;
				while (token[j] == 'n')
					j++;
			ans = (ans * dp[j - i]) % mod;
			i = j - 1;
		}
	}
	cout << ans;

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	char s[100000 + 5],token[100000 + 5];
	ll i,j,lnt;
	gets_s(s);
	i = 0;
	j = 1;
	while (s[i] != '\0')
	{
		token[j] = s[i];
		i++;
		j++;
	}

	lnt = i;

	if (token[1] == 'm' || token[1] == 'w')
	{
		cout << 0;
		return 0;
	}

	ll dp[100000 + 5] = { 0 };
	dp[1] = 1;
	dp[2] = 2;
	for (i = 3; i <= lnt; i++)
	{
		dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000009;
	}

	//for (i = 1; i <= lnt; i++)
		//cout << dp[i] << " ";
	//cout << endl;

	ll ans = 1;
	for (i = 1; i <= lnt; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << "0";
			return 0;
		}

		if (token[i] == 'u')
		{
			ll j = i;
			while (token[j] == 'u')
				j++;
			j--;
			ans = (ans * dp[j - i + 1]) % 1000000009;
			i = j;

		}
		if (token[i] == 'n')
		{
			ll j = i;
			while (token[j] == 'n')
				j++;
			j--;
			ans = (ans * dp[j - i + 1]) % 1000000009;
			i = j;

		}

	}

	cout << ans;

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	string token = "0", s;
	ll i,j,lnt;
	cin >> s;
	token.append(s);

	lnt = token.length() - 1;

	if (token[1] == 'm' || token[1] == 'w')
	{
		cout << 0;
		return 0;
	}

	ll dp[100000 + 5] = { 0 };
	dp[1] = 1;
	dp[2] = 2;
	for (i = 3; i <= lnt; i++)
	{
		dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000009;
	}

	//for (i = 1; i <= lnt; i++)
		//cout << dp[i] << " ";
	//cout << endl;

	ll ans = 1;
	for (i = 1; i <= lnt; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << "0";
			return 0;
		}

	}

	for (i = 0, j = 0; i <= lnt; i = j) {
		while (j <= lnt && s[j] == s[i])
			j++;
		if (s[i] == 'n' || s[i] == 'u')
			ans = ans * dp[j - i] % 1000000009;
	}

	cout << ans;

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	char s[100000 + 5],token[100000 + 5];
	ll i,j,lnt;
	gets_s(s);
	i = 0;
	j = 1;
	while (s[i] != '\0')
	{
		token[j] = s[i];
		i++;
		j++;
	}

	lnt = i;

	if (token[1] == 'm' || token[1] == 'w')
	{
		cout << 0;
		return 0;
	}

	ll n3 = 0, n2 = 0, u2 = 0, u3 = 0;

	for (i = 3; i <= lnt; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << 0;
			return 0;
		}

		if (token[i] == 'u' && token[i - 1] == 'u' && token[i - 2] == 'u')
		{
			u3++;
			token[i] = '0';
			token[i - 1] = '0';
			token[i - 2] = '0';
		}
		if (token[i] == 'n' && token[i - 1] == 'n' && token[i - 2] == 'n')
		{
			n3++;
			token[i] = '0';
			token[i - 1] = '0';
			token[i - 2] = '0';
		}
	}
	for (i = 2; i <= lnt; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << 0;
			return 0;
		}

		if (token[i] == 'u' && token[i - 1] == 'u')
		{
			u2++;
			token[i] = '0';
			token[i - 1] = '0';
		}
		if (token[i] == 'n' && token[i - 1] == 'n')
		{
			n2++;
			token[i] = '0';
			token[i - 1] = '0';
		}
	}

	//debug(u3); debug(n3); debug(u2); debug(u2);

	ll ans = 1;
	while (u3 != 0)
	{
		ans = (ans * 3) % 1000000007;
		u3--;
	}
	while (n3 != 0)
	{
		ans = (ans * 3) % 1000000007;
		n3--;
	}
	while (u2 != 0)
	{
		ans = (ans * 2) % 1000000007;
		u2--;
	}
	while (n2 != 0)
	{
		ans = (ans * 2) % 1000000007;
		n2--;
	}

	cout << ans;

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	string s, token = "0";
	cin >> s;
	token.append(s);
	ll i, n, j;
	n = token.length() - 1;
	for (i = 1; i <= n; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << "0";
			return 0;
		}
	}

	ll dp[100000 + 15] = { 0 };
	ll ans = 1;
	dp[0] = dp[1] = 1;
	for (i = 2; i <= 100000 + 1; i++)
		dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000009;

	for (i = 1; i <= n; i++)
	{
		if (token[i] == 'u')
		{
			j = i;
				while (token[j] == 'u')
					j++;
			ans = (ans * dp[j - i]) % 1000000009;
			i = j - 1;
		}
		if (token[i] == 'n')
		{
			j = i;
				while (token[j] == 'n')
					j++;
			ans = (ans * dp[j - i]) % 1000000009;
			i = j - 1;
		}
	}
	cout << ans;

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	char s[100000 + 5],token[100000 + 5];
	ll i,j,lnt;
	gets_s(s);
	i = 0;
	j = 1;
	while (s[i] != '\0')
	{
		token[j] = s[i];
		i++;
		j++;
	}

	lnt = i;

	if (token[1] == 'm' || token[1] == 'w')
	{
		cout << 0;
		return 0;
	}

	ll dp[100000 + 5] = { 0 };
	dp[1] = 1;
	dp[2] = 2;
	for (i = 3; i <= lnt; i++)
	{
		dp[i] = (dp[i - 1] % 1000000009 + dp[i - 2] % 1000000009) % 1000000009;
	}

	//for (i = 1; i <= lnt; i++)
		//cout << dp[i] << " ";
	//cout << endl;

	ll ans = 1;
	for (i = 1; i <= lnt; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << "0";
			return 0;
		}

		if (token[i] == 'u')
		{
			ll j = i;
			while (token[j] == 'u')
				j++;
			j--;
			ans = (ans * dp[j - i + 1]) % 1000000009;
			i = j;

		}
		if (token[i] == 'n')
		{
			ll j = i;
			while (token[j] == 'n')
				j++;
			j--;
			ans = (ans * dp[j - i + 1]) % 1000000009;
			i = j;

		}

	}

	cout << ans;

	return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <assert.h>

using namespace std;
#define debug(x) cout << "----------" << x << "---------" << endl;
#define ll long long
#define max2(a,b)       ((a) > (b) ? (a) : (b))
#define min2(a,b)       ((a) < (b) ? (a) : (b))
#define max3(a,b,c)     (max2(max2(a,b),c))
#define min3(a,b,c)     (min2(min2(a,b),c))
#define SWAP(xxx, yyy) (xxx) ^= (yyy) ^= (xxx) ^= (yyy)
inline int read() {
	char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; }
	for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x;
}
inline ll gcd(ll u, ll v) { while (v != 0) { ll r = u % v; u = v; v = r; }return u; }
inline ll power(ll base, ll exp) { ll result = 1; while (exp) { if (exp & 1) { result *= base; }exp >>= 1; base *= base; }return result; }

int main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	string token;
	ll i,j,lnt;
	cin >> token;

	lnt = token.length();

	if (token[1] == 'm' || token[1] == 'w')
	{
		cout << 0;
		return 0;
	}

	ll dp[100000 + 15] = { 0 };
	dp[0] = 1;
	dp[1] = 1;
	dp[2] = 2;
	for (i = 3; i < 100000 + 15; i++)
	{
		dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000009;
	}

	//for (i = 1; i <= lnt; i++)
		//cout << dp[i] << " ";
	//cout << endl;

	ll ans = 1;
	for (i = 0; i < lnt; i++)
	{
		if (token[i] == 'm' || token[i] == 'w')
		{
			cout << "0";
			return 0;
		}

	}

	for (i = 0, j = 0; i < lnt; i = j) {
		while (j < lnt && token[j] == token[i])
			j++;
		if (token[i] == 'n' || token[i] == 'u')
			ans = ans * dp[j - i] % 1000000009;
	}

	cout << ans;

	return 0;
}


#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
const int MAX = 1e5+1;
const int MOD = 1e9 + 7;
typedef long long ll;

int main() {
	string str; cin >> str;
	int idx_u[MAX], usize=0, idx_n[MAX], nsize=0;
	for (int i = 0; i < str.size(); i++) {
		if (str[i] == 'u')
			idx_u[usize++] = i;
		if (str[i] == 'n')
			idx_n[nsize++] = i;
	}

	ll d[MAX] = { 0 };
	d[1] = 1, d[2] = 2;
	for (int i = 3; i <= MAX-1; i++)
		d[i] = (d[i - 1] + d[i - 2]) % MOD;

	ll t = 1, ans_u = 1, ans_n=1;
	for (int i = 1; i <= usize; i++) {
		if (i<usize && idx_u[i] - idx_u[i - 1] == 1)
			t++;
		else {
			ans_u = (ans_u * d[t])%MOD;
			t = 1;
		}
	}
	t = 1;
	for (int i = 1; i <= nsize; i++) {
		if (i<nsize && idx_n[i] - idx_n[i - 1] == 1)
			t++;
		else {
			ans_n = (ans_n * d[t]) % MOD;
			t = 1;
		}
	}
	if (str.find("m") != string::npos || str.find("w") != string::npos)
		cout << 0 << '\n';
	else
		cout << (ans_u * ans_n) % MOD << '\n';
}


#include <iostream>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <deque>
#include <numeric>
#include <string>
#include <random>
typedef long long ll;
#define vsegda_prav72 ios_base::sync_with_stdio(0); cin.tie(0);

using namespace std;
const ll INFLL = 1e18;
const int MAXN = 3e5;
const ll INF = 1e9;
const ll kek = 998244353;
const ll mod = 1e9 + 7;

int main() {
	string s;
	cin >> s;
	ll* dp = new ll[100001];
	dp[0] = 1;
	dp[1] = 1;
	for (int i = 2; i < 100001; i++) {
		dp[i] = dp[i - 1] + dp[i - 2];
		if (dp[i] > mod) dp[i] %= mod;
	}

	ll ans = 1;
	ll acc = 0;
	char prev = '\0';
	s += "0";
	for (auto c : s) {
		if (c == 'w' || c == 'm') {
			cout << "0";
			return 0;

		}
		if (acc > 0 && prev != c) {
			ans = (ans*dp[acc]) % mod;
			acc = 0;
			prev = '\0';
		}
		if (c == 'n' || c == 'u') {
			prev = c;
		}
		if (prev == c) acc++;
	}

	cout << ans;
}


#include <iostream>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <deque>
#include <numeric>
#include <string>
#include <random>
typedef long long ll;
#define vsegda_prav72 ios_base::sync_with_stdio(0); cin.tie(0);

using namespace std;
const ll INFLL = 1e18;
const int MAXN = 3e5;
const ll INF = 1e9;
const ll kek = 998244353;
const ll mod = 1e9 + 7;

int main() {
	string s;
	cin >> s;
	int* dp = new int[100001];
	dp[0] = 1;
	dp[1] = 1;
	for (int i = 2; i < 100001; i++) {
		dp[i] = dp[i - 1] + dp[i - 2];
		if (dp[i] > mod) dp[i] %= mod;
	}

	int ans = 1;
	int acc = 0;
	char prev = '\0';
	s += "0";
	for (auto c : s) {
		if (c == 'w' || c == 'm') {
			cout << "0";
			return 0;

		}
		if ((c == 'u' || c == 'n')&&(acc == 0)) {
			prev = c;
			acc = 0;
		}
		if (c == prev) acc++;
		if (acc) {
			if (c != prev) {
				ans = (ans * dp[acc]) % mod;
				acc = 0;
			}
		}
	}

	cout << ans;
}


#include <iostream>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <deque>
#include <numeric>
#include <string>
#include <random>
typedef long long ll;
#define vsegda_prav72 ios_base::sync_with_stdio(0); cin.tie(0);

using namespace std;
const ll INFLL = 1e18;
const int MAXN = 3e5;
const ll INF = 1e9;
const ll kek = 998244353;
const ll mod = 1e9 + 7;

int main() {
	string s;
	cin >> s;
	long long* dp = new long long[100001];
	dp[0] = 1;
	dp[1] = 1;
	for (int i = 2; i < 100001; i++) {
		dp[i] = dp[i - 1] + dp[i - 2];
		if (dp[i] > mod) dp[i] %= mod;
	}

	int ans = 1;
	int acc = 0;
	char prev = '\0';
	s += "0";
	for (auto c : s) {
		if (c == 'w' || c == 'm') {
			cout << "0";
			return 0;

		}
		if ((c == 'u' || c == 'n')&&(acc == 0)) {
			prev = c;
			acc = 0;
		}
		if (c == prev) acc++;
		if (acc) {
			if (c != prev) {
				ans = (ans * dp[acc]) % mod;
				acc = 0;
			}
		}
	}

	cout << ans;
}


#include <iostream>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <deque>
#include <numeric>
#include <string>
#include <random>
typedef long long ll;
#define vsegda_prav72 ios_base::sync_with_stdio(0); cin.tie(0);

using namespace std;
const ll INFLL = 1e18;
const int MAXN = 3e5;
const ll INF = 1e9;
const ll kek = 998244353;
const ll mod = 1e9 + 7;

int main() {
	string s;
	cin >> s;
	int* dp = new int[100001];
	dp[0] = 1;
	dp[1] = 1;
	for (int i = 2; i < 100001; i++) {
		dp[i] = dp[i - 1] + dp[i - 2];
		if (dp[i] > mod) dp[i] %= mod;
	}

	int ans = 1;
	int acc = 0;
	char prev = '\0';
	s += "0";
	for (auto c : s) {
		if (c == 'w' || c == 'm') {
			cout << "0";
			return 0;

		}
		if (acc > 0 && prev != c) {
			ans = (ans * dp[acc]) & mod;
			acc = 0;
			prev = '\0';
		}
		if (c == 'n' || c == 'u') {
			prev = c;
		}
		if (prev == c) acc++;
	}

	cout << ans;
}


#include <iostream>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <deque>
#include <numeric>
#include <string>
#include <random>
typedef long long ll;
#define vsegda_prav72 ios_base::sync_with_stdio(0); cin.tie(0);

using namespace std;
const ll INFLL = 1e18;
const int MAXN = 3e5;
const ll INF = 1e9;
const ll kek = 998244353;
const ll mod = 1e9 + 7;

int main() {
	string s;
	cin >> s;
	int* dp = new int[100001];
	dp[0] = 1;
	dp[1] = 1;
	for (int i = 2; i < 100001; i++) {
		dp[i] = dp[i - 1] + dp[i - 2];
		if (dp[i] > mod) dp[i] %= mod;
	}

	int ans = 1;
	int acc = 0;
	char prev = '\0';
	s += "0";
	for (auto c : s) {
		if (c == 'w' || c == 'm') {
			cout << "0";
			return 0;

		}
		if (acc > 0 && prev != c) {
			ans = (ans * dp[acc]) % mod;
			acc = 0;
			prev = '\0';
		}
		if (c == 'n' || c == 'u') {
			prev = c;
		}
		if (prev == c) acc++;
	}

	cout << ans;
}


#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
#include <iostream>
using namespace std;
#define MAXN 100010
#define P 1000000007

typedef long long ll;

ll fib[MAXN];
char s[MAXN];

int main()
{
	for (int i = 0; i < MAXN; i++)
	{
		s[i] = 0;
	}
	scanf("%s", s);

	fib[0] = 1;
	fib[1] = 1;
	for (int i = 2; i < MAXN; i++)
	{
		fib[i] = (fib[i - 1] % P + fib[i - 2] % P) % P;
	}

	ll k = 1;
	int mode = 0, cnt = 0;//1-n, 2-u
	for (int i = 0; s[i]; i++)
	{
		if (s[i] == 'm' || s[i] == 'w') {
			printf("0");
			return 0;
		}
		if (s[i] == 'n') {
			if (mode == 1) {
				cnt++;
			}
			if (mode == 2) {
				k = (fib[cnt] % P * k) % P;
				cnt = 1;
				mode = 1;
			}
			if (mode == 0) {
				mode = 1;
				cnt = 1;
			}
		}else{
			if (s[i] == 'u') {
				if (mode == 2) {
					cnt++;
				}
				if (mode == 1) {
					k = (fib[cnt] % P * k) % P;
					cnt = 1;
					mode = 2;
				}
				if(mode == 0){
					mode = 2;
					cnt = 1;
				}
			}
			else {
				mode = 0;
				k = (fib[cnt] % P * k) % P;
				cnt = 0;
			}
		}
	}
	k = (fib[cnt] % P * k) % P;
	printf("%lld", k);
}


#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <set>
#include <string>

using std::string;
using std::vector;
using std::cin;
using std::cout;

string s;
int size;
long long ans = 1;
const long long pr = 1e9 + 7;
vector<int> fib;

void dofib()
{
	fib.resize(100001);
	fib[0] = 1;
	fib[1] = 1;
	for (int i = 2; i != 100001; i++)
		fib[i] = (fib[i - 1] + fib[i - 2]) % pr;
}

int main()
{
	cin >> s;
	size = s.size();
	for (int i = 0; i != size; i++)
		if (s[i] == 'm' || s[i] == 'w')
		{
			cout << 0;
			return 0;
		}
	int vsp, j;
	dofib();
	int i;
	for (i = 0; i != size; i++)
		if (s[i] == 'n' || s[i] == 'u')
		{
			for (j = i + 1; j != size; j++)
				if (s[j] != s[i])
					break;
			ans = (ans * fib[j - i]) % pr;
			i = j - 1;
		}
	cout << ans << "\n";
	return 0;
}


#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <set>
#include <string>

using std::string;
using std::vector;
using std::cin;
using std::cout;

string s;
int size;
long long ans = 1;
const long long pr = 1e9 + 7;
vector<int> fib;

void dofib()
{
	fib.resize(100001);
	fib[0] = 1;
	fib[1] = 1;
	for (int i = 2; i != 100001; i++)
		fib[i] = (fib[i - 1] + fib[i - 2]) % pr;
}

int main()
{
	cin >> s;
	size = s.size();
	for (int i = 0; i != size; i++)
		if (s[i] == 'm' || s[i] == 'w')
		{
			cout << 0;
			return 0;
		}
	int vsp, j;
	dofib();
	for (int i = 0; i != size; i++)
		if (i == size + 1)
			break;
		else if (s[i] == 'n' || s[i] == 'u')
		{
			for (j = i + 1; j != size; j++)
				if (s[j] != s[i])
					break;
			if (j == size)
				j++;
			vsp = j - i;
			ans = (ans * fib[vsp]) % pr;
			i = j;
		}
	cout << ans << "\n";
	return 0;
}


#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <set>
#include <string>

using std::string;
using std::vector;
using std::cin;
using std::cout;

string s;
int size;
long long ans = 1;
const long long pr = 1e9 + 7;
vector<int> fib;

void dofib()
{
	fib.resize(100001);
	fib[0] = 1;
	fib[1] = 1;
	for (int i = 2; i != 100001; i++)
		fib[i] = (fib[i - 1] + fib[i - 2]) % pr;
}

int main()
{
	cin >> s;
	size = s.size();
	for (int i = 0; i != size; i++)
		if (s[i] == 'm' || s[i] == 'w')
		{
			cout << 0;
			return 0;
		}
	int vsp, j;
	dofib();
	for (int i = 0; i != size; i++)
		if (i == size + 1)
			break;
		else if (s[i] == 'n' || s[i] == 'u')
		{
			for (j = i + 1; j != size; j++)
				if (s[j] != s[i])
					break;
			vsp = j - i;
			ans = (ans * fib[vsp]) % pr;
			i = j;
		}
	cout << ans << "\n";
	return 0;
}


#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <set>
#include <string>

using std::string;
using std::vector;
using std::cin;
using std::cout;

string s;
int size;
long long ans = 1;
const long long pr = 1e9 + 7;
vector<int> fib;

void dofib()
{
	fib.resize(100001);
	fib[0] = 1;
	fib[1] = 1;
	for (int i = 2; i != 100001; i++)
		fib[i] = (fib[i - 1] + fib[i - 2]) % pr;
}

int main()
{
	cin >> s;
	size = s.size();
	for (int i = 0; i != size; i++)
		if (s[i] == 'm' || s[i] == 'w')
		{
			cout << 0;
			return 0;
		}
	int vsp, j;
	dofib();
	int i;
	for (i = 0; i < size; i++)
		if (s[i] == 'n' || s[i] == 'u')
		{
			for (j = i + 1; j != size; j++)
				if (s[j] != s[i])
					break;
			ans = (ans * fib[j - i]) % pr;
			i = j;
		}
	cout << ans << "\n";
	return 0;
}


#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <set>
#include <string>

using std::string;
using std::vector;
using std::cin;
using std::cout;

string s;
int size;
long long ans = 1;
const long long pr = 1e9 + 7;
vector<int> fib;

void dofib()
{
	fib.resize(100001);
	fib[0] = 1;
	fib[1] = 1;
	for (int i = 2; i != 100001; i++)
		fib[i] = (fib[i - 1] + fib[i - 2]) % pr;
}

int main()
{
	cin >> s;
	size = s.size();
	for (int i = 0; i != size; i++)
		if (s[i] == 'm' || s[i] == 'w')
		{
			cout << 0;
			return 0;
		}
	int vsp, j;
	dofib();
	int i;
	for (i = 0; i < size; i++)
		if (s[i] == 'n' || s[i] == 'u')
		{
			for (j = i + 1; j != size; j++)
				if (s[j] != s[i])
					break;
			ans = (ans * fib[j - i]) % pr;
			i = j - 1;
		}
	cout << ans << "\n";
	return 0;
}


#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<iomanip>
#include<queue>
#include<stack>
#include<cctype>
#include<deque>
#include <random>
#include <cstdio>
#include<stdio.h>
#include <intrin.h>
#include <iterator>

//Za Sany i Dimasa
//personal coach - Skeef79
//by_very_love_Vika_Mochalina

using namespace std;

template<typename T> void output(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cout << a[i] << ' ';
}

template <typename T> void input(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cin >> a[i];
}

#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:16777216")

//std::random_device rd;
//std::mt19937 mersenne(rd());

#define pb push_back
#define en '\n'
#define for0(i,n) for(int i = 0;i<n;i++)
#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(),(x).rend()
#define snd second
#define fst first
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>

const int  NMAX = 1e5;

struct data1 {

	int l = INT_MAX;
	int r = INT_MIN;
	int num = 0;
	ll sum = 0;
};

//vector<bool> used;
//vector<vector<int>> g;
//used.resize(n);
//g.resize(n, vector<int>());

//void dfs(int v) {
//	used[v] = true;
//
//	for0(i, g[v].size()) {
//		int to = g[v][i];
//		if (!used[to])
//			dfs(v);
//	}
//
//}

int nod(int a, int b) {
	return b ? nod(b, a % b) : a;
}

const int mod = 1e9 + 7;

vector<ll> fact(1e5+10);

void factor() {
	fact[0] = 1;
	for (int i = 1; i < fact.size(); i++)
		fact[i] = fact[i - 1] * i % mod;
}

int main()
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	string s;
	cin >> s;
	factor();
	char cur = s[0];
	int cur_num = 0;
	ll ans = 0;
	for (int i = 1; i < s.size(); i++) {
		if (s[i] == 'm' || s[i] == 'w') {
			cout << 0;
			return 0;
		}
		if (s[i] == 'n' && cur == 'n') {
			cur_num++;
			continue;
		}
		if (s[i] == 'u' && cur == 'u') {
			cur_num++;
			continue;
		}

		if (cur_num == 0 && (s[i] == 'u' || s[i] == 'n')) {
			cur = s[i];
			cur_num++;
			continue;
		}

		if (cur_num == 0)
			continue;

		for (int j = 0; j < cur_num / 2; j++) {
			ans += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod ) % mod;
		}
		cur_num = 0;
		cur = s[i];
	}
	for (int j = 0; j <= cur_num / 2; j++) {
		ans += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod) % mod;

	}

	cout << ans+1;
}


#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<iomanip>
#include<queue>
#include<stack>
#include<cctype>
#include<deque>
#include <random>
#include <cstdio>
#include<stdio.h>
#include <intrin.h>
#include <iterator>

//Za Sany i Dimasa
//personal coach - Skeef79
//by_very_love_Vika_Mochalina

using namespace std;

template<typename T> void output(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cout << a[i] << ' ';
}

template <typename T> void input(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cin >> a[i];
}

#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:16777216")

//std::random_device rd;
//std::mt19937 mersenne(rd());

#define pb push_back
#define en '\n'
#define for0(i,n) for(int i = 0;i<n;i++)
#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(),(x).rend()
#define snd second
#define fst first
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>

const int  NMAX = 1e5;

struct data1 {

	int l = INT_MAX;
	int r = INT_MIN;
	int num = 0;
	ll sum = 0;
};

//vector<bool> used;
//vector<vector<int>> g;
//used.resize(n);
//g.resize(n, vector<int>());

//void dfs(int v) {
//	used[v] = true;
//
//	for0(i, g[v].size()) {
//		int to = g[v][i];
//		if (!used[to])
//			dfs(v);
//	}
//
//}

int nod(int a, int b) {
	return b ? nod(b, a % b) : a;
}

const int mod = 1e9 + 7;

vector<ll> fact(1e5+10);

void factor() {
	fact[0] = 1;
	for (int i = 1; i < fact.size(); i++)
		fact[i] = fact[i - 1] * i % mod;
}

int main()
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	string s;
	cin >> s;
	factor();
	int cur_num = 0;
	char cur = s[0];
	if (s[0]=='u' || s[0]=='n')
		cur_num = 1;
	ll ans = 1;
	if (s[0] == 'm' || s[0] == 'w') {
		cout << 0;
		return 0;
	}
	for (int i = 1; i < s.size(); i++) {
		if (s[i] == 'm' || s[i] == 'w') {
			cout << 0;
			return 0;
		}
		if (s[i] == 'n' && cur == 'n') {
			cur_num++;
			continue;
		}
		if (s[i] == 'u' && cur == 'u') {
			cur_num++;
			continue;
		}

		if (cur_num == 0 && (s[i] == 'u' || s[i] == 'n')) {
			cur = s[i];
			cur_num++;
			continue;
		}

		if (cur_num == 0)
			continue;

		ll tec = 0;
		for (int j = 0; j <= cur_num / 2; j++) {
			tec += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod ) % mod;
		}
		ans = ans * tec %mod;
		if (s[i] == 'u' || s[i] == 'n')
			cur_num = 1;
		else
			cur_num = 0;
		cur = s[i];
	}
	ll tec = 0;
	for (int j = 0; j <= cur_num / 2; j++) {
		tec += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod) % mod;
	}
	ans = ans * tec%mod;

	cout << ans;

}


#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<iomanip>
#include<queue>
#include<stack>
#include<cctype>
#include<deque>
#include <random>
#include <cstdio>
#include<stdio.h>
#include <intrin.h>
#include <iterator>

//Za Sany i Dimasa
//personal coach - Skeef79
//by_very_love_Vika_Mochalina

using namespace std;

template<typename T> void output(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cout << a[i] << ' ';
}

template <typename T> void input(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cin >> a[i];
}

#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:16777216")

//std::random_device rd;
//std::mt19937 mersenne(rd());

#define pb push_back
#define en '\n'
#define for0(i,n) for(int i = 0;i<n;i++)
#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(),(x).rend()
#define snd second
#define fst first
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>

const int  NMAX = 1e5;

struct data1 {

	int l = INT_MAX;
	int r = INT_MIN;
	int num = 0;
	ll sum = 0;
};

//vector<bool> used;
//vector<vector<int>> g;
//used.resize(n);
//g.resize(n, vector<int>());

//void dfs(int v) {
//	used[v] = true;
//
//	for0(i, g[v].size()) {
//		int to = g[v][i];
//		if (!used[to])
//			dfs(v);
//	}
//
//}

int nod(int a, int b) {
	return b ? nod(b, a % b) : a;
}

const int mod = 1e9 + 7;

vector<ll> fact(1e5+10);

void factor() {
	fact[0] = 1;
	for (int i = 1; i < fact.size(); i++)
		fact[i] = fact[i - 1] * i % mod;
}

int main()
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	string s;
	cin >> s;
	factor();
	int cur_num = 0;
	char cur = s[0];
	if (s[0]=='u' || s[0]=='n')
		cur_num = 1;
	ll ans = 1;
	if (s[0] == 'm' || s[0] == 'w') {
		cout << 0;
		return 0;
	}
	for (int i = 1; i < s.size(); i++) {
		if (s[i] == 'm' || s[i] == 'w') {
			cout << 0;
			return 0;
		}
		if (s[i] == 'n' && cur == 'n') {
			cur_num++;
			continue;
		}
		if (s[i] == 'u' && cur == 'u') {
			cur_num++;
			continue;
		}

		if (cur_num == 0 && (s[i] == 'u' || s[i] == 'n')) {
			cur = s[i];
			cur_num++;
			continue;
		}

		if (cur_num == 0)
			continue;

		ll tec = 0;
		for (int j = 0; j <= cur_num / 2; j++) {
			tec += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod ) % mod;
		}
		ans = ans * tec %mod;
		if (s[i] == 'u' || s[i] == 'n')
			cur_num = 1;
		else
			cur_num = 0;
		cur = s[i];
	}
	ll tec = 0;
	for (int j = 0; j <= cur_num / 2; j++) {
		tec += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod) % mod;
	}
	ans = ans * (tec%mod) %mod;

	cout << ans;

}


#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<iomanip>
#include<queue>
#include<stack>
#include<cctype>
#include<deque>
#include <random>
#include <cstdio>
#include<stdio.h>
#include <intrin.h>
#include <iterator>

//Za Sany i Dimasa
//personal coach - Skeef79
//by_very_love_Vika_Mochalina

using namespace std;

template<typename T> void output(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cout << a[i] << ' ';
}

template <typename T> void input(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cin >> a[i];
}

#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:16777216")

//std::random_device rd;
//std::mt19937 mersenne(rd());

#define pb push_back
#define en '\n'
#define for0(i,n) for(int i = 0;i<n;i++)
#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(),(x).rend()
#define snd second
#define fst first
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>

const int  NMAX = 1e5;

struct data1 {

	int l = INT_MAX;
	int r = INT_MIN;
	int num = 0;
	ll sum = 0;
};

//vector<bool> used;
//vector<vector<int>> g;
//used.resize(n);
//g.resize(n, vector<int>());

//void dfs(int v) {
//	used[v] = true;
//
//	for0(i, g[v].size()) {
//		int to = g[v][i];
//		if (!used[to])
//			dfs(v);
//	}
//
//}

int nod(int a, int b) {
	return b ? nod(b, a % b) : a;
}

const int mod = 1e9 + 7;

vector<ll> fact(1e5+10);

void factor() {
	fact[0] = 1;
	for (int i = 1; i < fact.size(); i++)
		fact[i] = fact[i - 1] * i % mod;
}

int main()
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	string s;
	cin >> s;
	factor();
	int cur_num = 0;
	char cur = s[0];
	if (s[0]=='u' || s[0]=='n')
		cur_num = 1;
	ll ans = 1;
	for (int i = 1; i < s.size(); i++) {
		if (s[i] == 'm' || s[i] == 'w') {
			cout << 0;
			return 0;
		}
		if (s[i] == 'n' && cur == 'n') {
			cur_num++;
			continue;
		}
		if (s[i] == 'u' && cur == 'u') {
			cur_num++;
			continue;
		}

		if (cur_num == 0 && (s[i] == 'u' || s[i] == 'n')) {
			cur = s[i];
			cur_num++;
			continue;
		}

		if (cur_num == 0)
			continue;

		ll tec = 0;
		for (int j = 0; j <= cur_num / 2; j++) {
			tec += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod ) % mod;
		}
		ans = ans * tec %mod;
		cur_num = 0;
		cur = s[i];
	}
	ll tec = 0;
	for (int j = 0; j <= cur_num / 2; j++) {
		tec += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod) % mod;
	}
	ans = ans * tec%mod;

	cout << ans;

}


#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<iomanip>
#include<queue>
#include<stack>
#include<cctype>
#include<deque>
#include <random>
#include <cstdio>
#include<stdio.h>
#include <intrin.h>
#include <iterator>

//Za Sany i Dimasa
//personal coach - Skeef79
//by_very_love_Vika_Mochalina

using namespace std;

template<typename T> void output(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cout << a[i] << ' ';
}

template <typename T> void input(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cin >> a[i];
}

#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:16777216")

//std::random_device rd;
//std::mt19937 mersenne(rd());

#define pb push_back
#define en '\n'
#define for0(i,n) for(int i = 0;i<n;i++)
#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(),(x).rend()
#define snd second
#define fst first
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>

const int  NMAX = 1e5;

struct data1 {

	int l = INT_MAX;
	int r = INT_MIN;
	int num = 0;
	ll sum = 0;
};

//vector<bool> used;
//vector<vector<int>> g;
//used.resize(n);
//g.resize(n, vector<int>());

//void dfs(int v) {
//	used[v] = true;
//
//	for0(i, g[v].size()) {
//		int to = g[v][i];
//		if (!used[to])
//			dfs(v);
//	}
//
//}

int nod(int a, int b) {
	return b ? nod(b, a % b) : a;
}

const int mod = 1e9 + 7;

vector<ll> fact(1e5+10);

void factor() {
	fact[0] = 1;
	for (int i = 1; i < fact.size(); i++)
		fact[i] = fact[i - 1] * i % mod;
}

int main()
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	string s;
	cin >> s;
	factor();
	char cur = s[0];
	int cur_num = 0;
	ll ans = 0;
	for (int i = 1; i < s.size(); i++) {
		if (s[i] == 'm' || s[i] == 'w') {
			cout << 0;
			return 0;
		}
		if (s[i] == 'n' && cur == 'n') {
			cur_num++;
			continue;
		}
		if (s[i] == 'u' && cur == 'u') {
			cur_num++;
			continue;
		}

		if (cur_num == 0 && (s[i] == 'u' || s[i] == 'n')) {
			cur = s[i];
			cur_num++;
			continue;
		}

		if (cur_num == 0)
			continue;

		for (int j = 0; j < cur_num / 2; j++) {
			ans += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod ) % mod;
		}
		cur_num = 0;
		cur = s[i];
	}

	for (int j = 0; j < cur_num / 2; j++) {
		ans += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod) % mod;

	}

	cout << (ans+1) %mod;
}


#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<iomanip>
#include<queue>
#include<stack>
#include<cctype>
#include<deque>
#include <random>
#include <cstdio>
#include<stdio.h>
#include <intrin.h>
#include <iterator>

//Za Sany i Dimasa
//personal coach - Skeef79
//by_very_love_Vika_Mochalina

using namespace std;

template<typename T> void output(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cout << a[i] << ' ';
}

template <typename T> void input(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cin >> a[i];
}

#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:16777216")

//std::random_device rd;
//std::mt19937 mersenne(rd());

#define pb push_back
#define en '\n'
#define for0(i,n) for(int i = 0;i<n;i++)
#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(),(x).rend()
#define snd second
#define fst first
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>

const int  NMAX = 1e5;

struct data1 {

	int l = INT_MAX;
	int r = INT_MIN;
	int num = 0;
	ll sum = 0;
};

//vector<bool> used;
//vector<vector<int>> g;
//used.resize(n);
//g.resize(n, vector<int>());

//void dfs(int v) {
//	used[v] = true;
//
//	for0(i, g[v].size()) {
//		int to = g[v][i];
//		if (!used[to])
//			dfs(v);
//	}
//
//}

int nod(int a, int b) {
	return b ? nod(b, a % b) : a;
}

const int mod = 1e9 + 7;

vector<ll> fact(1e5+10);

void factor() {
	fact[0] = 1;
	for (int i = 1; i < fact.size(); i++)
		fact[i] = fact[i - 1] * i % mod;
}

int main()
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	string s;
	cin >> s;
	factor();
	int cur_num = 0;
	char cur = s[0];
	if (s[0]=='u' || s[0]=='n')
		cur_num = 1;
	ll ans = 1;
	for (int i = 1; i < s.size(); i++) {
		if (s[i] == 'm' || s[i] == 'w') {
			cout << 0;
			return 0;
		}
		if (s[i] == 'n' && cur == 'n') {
			cur_num++;
			continue;
		}
		if (s[i] == 'u' && cur == 'u') {
			cur_num++;
			continue;
		}

		if (cur_num == 0 && (s[i] == 'u' || s[i] == 'n')) {
			cur = s[i];
			cur_num++;
			continue;
		}

		if (cur_num == 0)
			continue;

		ll tec = 0;
		for (int j = 0; j <= cur_num / 2; j++) {
			tec += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod ) % mod;
		}
		ans = ans * tec %mod;
		if (s[i] == 'u' || s[i] == 'n')
			cur_num = 1;
		else
			cur_num = 0;
		cur = s[i];
	}
	ll tec = 0;
	for (int j = 0; j <= cur_num / 2; j++) {
		tec += fact[cur_num - j] / (fact[cur_num - j * 2] * fact[j] % mod) % mod;
	}
	ans = ans * tec%mod;

	cout << ans;

}


#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<iomanip>
#include<queue>
#include<stack>
#include<cctype>
#include<deque>
#include <random>
#include <cstdio>
#include<stdio.h>
#include <intrin.h>
#include <iterator>

//Za Sany i Dimasa
//personal coach - Skeef79
//by_very_love_Vika_Mochalina

using namespace std;

template<typename T> void output(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cout << a[i] << ' ';
}

template <typename T> void input(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cin >> a[i];
}

#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:16777216")

//std::random_device rd;
//std::mt19937 mersenne(rd());

#define pb push_back
#define en '\n'
#define for0(i,n) for(int i = 0;i<n;i++)
#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(),(x).rend()
#define snd second
#define fst first
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>

const int  NMAX = 1e5;

struct data1 {

	int l = INT_MAX;
	int r = INT_MIN;
	int num = 0;
	ll sum = 0;
};

//vector<bool> used;
//vector<vector<int>> g;
//used.resize(n);
//g.resize(n, vector<int>());

//void dfs(int v) {
//	used[v] = true;
//
//	for0(i, g[v].size()) {
//		int to = g[v][i];
//		if (!used[to])
//			dfs(v);
//	}
//
//}
int const mod = 1e9 + 7;

vector<ll> fib(1e5 + 10);

void fibonacci() {
	fib[0] = 1;
	fib[1] = 1;
	for (int i = 2; i < fib.size(); i++)
		fib[i] = (fib[i - 1] + fib[i - 2]) %mod;

}

int main()
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	string s;
	cin >> s;
	fibonacci();

	char cur = 'u';
	int cur_num = 0;
	vector<int> for_ans;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == 'm' || s[i] == 'w') {
			cout << 0;
			return 0;
		}

		if (s[i] != cur && cur_num != 0) {
			for_ans.pb(cur_num);
			cur_num = 0;
		}
		if ((s[i] == 'u' || s[i] == 'n') && cur_num == 0) {
			cur = s[i];
			cur_num = 1;
			continue;
		}

		if (s[i] == cur) {
			cur_num++;
			continue;
		}
	}
	for_ans.pb(cur_num);

	ll ans = 1;
	for (ll to : for_ans)
		ans = ans * fib[to] % mod;

	cout << ans;

}


#include <iostream>
#include <string.h>

using namespace std;

const long long mod =1e9 + 7;
const int DIM = 1e5 + 7;

char v[DIM];

long long putere(int S)
{
   long long rez = 0;
   long long  p = 0;
   while(p <= S)
   {
       long long rez3 = 1;
       for(int h = S - p + 1;h <= S; h++)
        rez3 = (rez3 * h) % mod;
        rez +=rez3;
       p++;
       S--;
   }
   return rez;
}

int main()
{

  cin.getline(v,DIM);

  int K = 0;
  long long S = 0;
  long long lit = 0;
  long long rez1 = 0;
  long long rez2 = 0;
  int verifm = 0;
  int verifw = 0;
  for(int i = 0; i < strlen(v); i++)
  {
      if(v[i] == 'n' && verifm == 0)
      {
          if(rez1 == 0)
            rez1 = 1;
          S++;
          for(int j = i + 1;j < strlen(v); j++ )
            if(v[j] == 'n')
            S++;
          else
            {
                rez1 = (rez1 * putere(S)) % mod;
             i = j - 1;
             j = strlen(v) + 2;
             S = 1;
            }
            if(S!=1)
            {
                rez1 = (rez1 * putere(S)) % mod;
            break;
            }
            S = 0;
      }
      else
      if(v[i] == 'm')
      {verifm = 1;
      rez1 = 1;
      }
      else
      if(v[i] == 'w')
      {verifw = 1;
       rez2 = 1;
      }
      else
      if(v[i] == 'u' && verifw == 0)
      {
          if(rez2 == 0)
            rez2 = 1;
          S++;
          for(int j = i + 1;j < strlen(v); j++ )
            if(v[j] == 'u')
            S++;
          else
            {rez2 = (rez2 * putere(S)) % mod;
             i = j - 1;
             j = strlen(v) + 2;
             S = 1;
            }
            if(S!=1)
            {
                rez2 = (rez2 * putere(S)) % mod;
                break;
            }
            S = 0;
      }

       if(verifm == 1 && verifw == 1)
           {
            cout << 0;
            K = 1;
            break;
           }
  }
  if(rez1 != 0 && rez2 == 0 && verifm == 0)
    rez2 = 1;
  if(rez2 !=0 && rez1 == 0 && verifw == 0)
    rez1 = 1;
  if(verifm == 1 && rez2 == 0)
  {cout << 0;
  return 0;
  }
  if(verifw == 1 && rez1 == 0)
{
    cout << 0;
    return 0;
}
  if(K == 0)
    cout << (rez1 * rez2) % mod;
    return 0;
}


#include <iostream>
#include <string.h>

using namespace std;

const long long mod =1e9 + 7;
const int DIM = 1e5 + 7;

char v[DIM];

long long putere(int S)
{
   long long rez = 0;
   long long  p = 0;
   while(p <= S)
   {
       long long rez3 = 1;
       for(int h = S - p + 1;h <= S; h++)
        rez3 = (rez3 * h) % mod;
        rez +=rez3;
       p++;
       S--;
   }
   return rez;
}

int main()
{

  cin.getline(v,DIM);

  int K = 0;
  long long S = 0;
  long long lit = 0;
  long long rez1 = 0;
  long long rez2 = 0;
  int verifm = 0;
  int verifw = 0;
  for(int i = 0; i < strlen(v); i++)
  {
      if(v[i] == 'n' && verifm == 0)
      {
          if(rez1 == 0)
            rez1 = 1;
          S++;
          for(int j = i + 1;j < strlen(v); j++ )
            if(v[j] == 'n')
            S++;
          else
            {
                rez1 = (rez1 * putere(S)) % mod;
             i = j - 1;
             j = strlen(v) + 2;
             S = 1;
            }
            if(S!=1)
            {
                rez1 = (rez1 * putere(S)) % mod;
            break;
            }
            S = 0;
      }
      else
      if(v[i] == 'm')
      {verifm = 1;
      rez1 = 1;
      }
      else
      if(v[i] == 'w')
      {verifw = 1;
       rez2 = 1;
      }
      else
      if(v[i] == 'u' && verifw == 0)
      {
          if(rez2 == 0)
            rez2 = 1;
          S++;
          for(int j = i + 1;j < strlen(v); j++ )
            if(v[j] == 'u')
            S++;
          else
            {rez2 = (rez2 * putere(S)) % mod;
             i = j - 1;
             j = strlen(v) + 2;
             S = 1;
            }
            if(S!=1)
            {
                rez2 = (rez2 * putere(S)) % mod;
                break;
            }
            S = 0;
      }

       if(verifm == 1 && verifw == 1)
           {
            cout << 0;
            K = 1;
            break;
           }
  }
  if(rez1 != 0 && rez2 == 0 && verifm == 0)
    rez2 = 1;
  if(rez2 !=0 && rez1 == 0 && verifw == 0)
    rez1 = 1;
  if(verifm == 1)
    rez1 = 1;
  if(verifw == 1)
    rez2 = 1;
  if(K == 0)
    cout << (rez1 * rez2) % mod;
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <math.h>
#include <queue>
#include <string>
#include <set>
#include <string.h>
#include <map>
#include <vector>
#include <fstream>
using namespace std;
#define N 222000
#define M 1100000
//#define MAXN 1125899906842624L
#define MAXVAL 1300000
#define MAXN 520*520
#define MOD 1000000007
int n, m;
char str[N];
int dp[N];

void solve() {
	int i, x, y;
	dp[0] = 1;
	dp[1] = 1;
	if (str[0] == 'm' || str[0] == 'w' || str[1] == 'm' || str[1] == 'w') {
		printf("0\n");
		return;
	}
	n = strlen(str);
	if (str[1] == 'n' && str[1] == str[0] || str[1] == 'u' && str[1] == str[0]) {
		dp[1]++;
	}
	for (i = 2; i < n; i++) {
		if (str[i] == 'm' || str[i] == 'w') {
			printf("0\n");
			return;
		}
		if (str[i] == 'n' && str[i] == str[i - 1]) {
			dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
		}
		else if (str[i] == 'u' && str[i] == str[i - 1]) {
			dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
		}
		else {
			dp[i] = dp[i - 1];
		}
	}
	printf("%d\n", dp[n - 1]);
}
int main() {
	int tc;
	while (scanf("%s", &str) != EOF){
		solve();
	}
	return 0;
}


#include<cstdio>
#include<string.h>
#include<string>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=100010;
const int mod=1e9+7;
char word[maxn];
int f[maxn];
int main()
{
    scanf("%s",word+1);
    int n=strlen(word+1);
    f[0]=1;
    for(int i=1;i<=n;++i)
    {
        f[i]=f[i-1];
        if(word[i]=='w'||word[i]=='m')
        {
            printf("0\n");
            return 0;
        }
        if(word[i]=='u'&&word[i-1]=='u')
        {
            f[i]=(f[i]+f[i-2])%mod;
        }
        else if(word[i]=='n'&&word[i-1]=='n')
        {
            f[i]=(f[i]+f[i-2])%mod;
        }
    }
    printf("%d\n",f[n]);
    return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
#define ll long long
const ll mod=1e9+7;
char s[100009];
int len;
ll fac[100009],ni[100009];
ll qpow(ll x,ll y){
	ll t=1;
	while(y){
		if(y%2==1) t=(t*x)%mod;
		x=(x*x)%mod,y/=2;
	}
	return t;
}
ll C(int x,int y){
	return ((fac[y]*ni[x])%mod*ni[y-x])%mod;
}
ll make(int x){
	ll ans=0;
	for(int i=0;i*2<=x;i++)
		(ans+=C(i,x-i))%=mod;
	return ans;
}
int main(){
	scanf("%s",s);
	len=strlen(s);
	fac[0]=1;
	ll ans=1;
	ni[0]=1;
	for(int i=1;i<=len;i++) fac[i]=(fac[i-1]*i)%mod,ni[i]=qpow(fac[i],mod-2);
	int posn=0,posu=0;
	for(int i=0;i<len;i++){
		if(s[i]=='m'||s[i]=='w'){
			printf("0\n");
			return 0;
		}
		if(s[i]=='n') posn++;
		else{
			if(posn>0) (ans*=make(posn))%=mod,posn=0;
		}
		if(i==len-1&&posn>0) (ans*=make(posn))%=mod,posn=0;
		if(s[i]=='u') posu++;
		else{
			if(posu>0) (ans*=make(posu))%=mod,posu=0;
		}
		if(i==len-1&&posu>0) (ans*=make(posu))%=mod,posu=0;
	}
	printf("%lld\n",ans);
	return 0;
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <deque>
#include <set>
#include <map>
#include <queue>
using namespace std;
#define pb push_back
#define mp make_pair
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long LL;
const LL INF = (1LL << 60) - 1;
const LL MOD = 1e9 + 7;
const LL N = 200005;
int dx[] = { -1, 0, 1, 0 };
int dy[] = { 0, 1, 0, -1 };

int main() {
    //freopen("input.txt", "r", stdin);
   //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(20), cout.setf(ios::fixed);
    string s;
    cin >> s;
    for (char c : s) {
        if (c == 'w' || c == 'm') {
            cout << 0 << endl;
            return 0;
        }
    }
    //dp
    int dp[10011];
    dp[0] = dp[1] = 1;
    for (int i = 2; i <= s.size(); i++) {
        dp[i] = dp[i - 1];
        if (s[i - 2] == s[i - 1] && s[i - 1] == 'u' || s[i - 1] == 'n') {
            dp[i] = (dp[i] + dp[i - 2]) % MOD;
        }
    }
    cout << dp[s.size()] << endl;
}


#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <bitset>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <deque>
#include <set>
#include <map>
#include <queue>
using namespace std;
#define pb push_back
#define mp make_pair
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long LL;
const LL INF = 2e6;
const LL MOD = 1e9 + 7;
const LL _ = 1e10;

void solve() {
    string s;
    cin >> s;
    for (char x : s) {
        if (x == 'w' || x == 'm') {
            cout << 0 << endl;
            return;
        }
    }
    int n = s.size();
    vector <int> dp(n + 1);
    dp[0] = dp[1] = 1;
    for (int i = 2; i <= n; i++) {
        dp[i] = dp[i - 1];
        if (s[i - 1] == s[i - 2] && (s[i - 1] == 'u' || s[i - 1] == 'n')) {
            dp[i] = (dp[i] + dp[i - 2]) % MOD;
        }
    }
    cout << dp[n] << endl;
}

int main() {
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(20), cout.setf(ios::fixed);
    /*int t;
    cin >> t;
    while (t--) {
        solve();
    }*/
    solve();
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <deque>
#include <set>
#include <map>
#include <queue>
using namespace std;
#define pb push_back
#define mp make_pair
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long LL;
const LL INF = (1LL << 60) - 1;
const LL MOD = 1e9 + 7;
const LL N = 200005;
int dx[] = { -1, 0, 1, 0 };
int dy[] = { 0, 1, 0, -1 };

int main() {
    //freopen("input.txt", "r", stdin);
   //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(20), cout.setf(ios::fixed);
    string s;
    cin >> s;
    for (char c : s) {
        if (c == 'w' || c == 'm') {
            cout << 0 << endl;
            return 0;
        }
    }
    //dp
    int dp[100111];
    dp[0] = dp[1] = 1;
    for (int i = 2; i <= s.size(); i++) {
        dp[i] = dp[i - 1];
        if (s[i - 2] == s[i - 1] && s[i - 1] == 'u' || s[i - 1] == 'n') {
            dp[i] = (dp[i] + dp[i - 2]) % MOD;
        }
    }
    cout << dp[s.size()] << endl;
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <deque>
#include <set>
#include <map>
#include <queue>
using namespace std;
#define pb push_back
#define mp make_pair
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long LL;
const LL INF = (1LL << 60) - 1;
const LL MOD = 1e9 + 7;
const LL N = 200005;
int dx[] = { -1, 0, 1, 0 };
int dy[] = { 0, 1, 0, -1 };

int main() {
    //freopen("input.txt", "r", stdin);
   //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(20), cout.setf(ios::fixed);
    string s;
    cin >> s;
    for (char c : s) {
        if (c == 'w' || c == 'm') {
            cout << 0 << endl;
            return 0;
        }
    }
    //dp
    int dp[10011];
    dp[0] = dp[1] = 1;
    for (int i = 2; i <= s.size(); i++) {
        dp[i] = dp[i - 1];
        if (s[i - 1] == s[i] && s[i - 1] == 'u' || s[i - 1] == 'n') {
            dp[i] = (dp[i] + dp[i - 2]) % MOD;
        }
    }
    cout << dp[s.size()] << endl;
}


#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <bitset>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <deque>
#include <set>
#include <map>
#include <queue>
using namespace std;
#define pb push_back
#define mp make_pair
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long LL;
const LL INF = 2e6;
const LL MOD = 1e9 + 7;
const LL _ = 1e10;

void solve() {
    string s;
    cin >> s;
    for (char x : s) {
        if (x == 'w' || x == 'm') {
            cout << 0 << endl;
        }
    }
    int n = s.size();
    vector <int> dp(n + 1);
    dp[0] = dp[1] = 1;
    for (int i = 2; i <= n; i++) {
        dp[i] = dp[i - 1];
        if (s[i - 1] == s[i - 2] && (s[i - 1] == 'u' || s[i - 1] == 'n')) {
            dp[i] = (dp[i] + dp[i - 2]) % MOD;
        }
    }
    cout << dp[n] << endl;
}

int main() {
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(20), cout.setf(ios::fixed);
    /*int t;
    cin >> t;
    while (t--) {
        solve();
    }*/
    solve();
}


#include<iostream>
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<string>
#include<vector>
#include<queue>
#include<algorithm>
#include<deque>
#include<map>
#include<stdlib.h>
#include<set>
#include<stack>
#include <numeric>
#include <functional>
#include<fstream>
//#include<bits/stdc++.h>
//#include<unordered_map>
#define ll long long
#define ms(a,b) memset(a,b,sizeof(a))
#define lowbit(x) x & -x
#define bug cout<<"----acac----"<<endl
#define IOS ios::sync_with_stdio(false), cin.tie(0),cout.tie(0)
using namespace std;
const int maxn = 1e5 + 50;
const int inf = 1e9+5;
const int mod = 1e9 + 7;
int dp[maxn];
char s[maxn];
int main()
{
    //string s;
    cin>>s+1;
    int len=strlen(s+1);
    dp[0]=1;
    bool flage=true;
    for(int i=1;i<=len;i++)
    {
        dp[i]=dp[i-1];
        if(s[i]=='w'||s[i]=='m')
        {
            flage=false;
            break;
        }

        else if(s[i]=='n'&&s[i-1]=='n'||s[i]=='u'&&s[i-1]=='u')
        {
            dp[i]=(dp[i-1]+dp[i-2])%mod;
        }
    }
    cout<<dp[len]<<endl;
    return 0;
}


#include<iostream>
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<string>
#include<vector>
#include<queue>
#include<algorithm>
#include<deque>
#include<map>
#include<stdlib.h>
#include<set>
#include<stack>
#include <numeric>
#include <functional>
#include<fstream>
//#include<bits/stdc++.h>
//#include<unordered_map>
#define ll long long
#define ms(a,b) memset(a,b,sizeof(a))
#define lowbit(x) x & -x
#define bug cout<<"----acac----"<<endl
#define IOS ios::sync_with_stdio(false), cin.tie(0),cout.tie(0)
using namespace std;
const int maxn = 1e5 + 50;
const int inf = 1e9+5;
const int mod = 1e9 + 7;
int dp[maxn];
char s[maxn];
int main()
{
    //string s;
    cin>>s+1;
    int len=strlen(s+1);
    dp[0]=1;
    bool flage=true;
    for(int i=1;i<=len;i++)
    {
        dp[i]=dp[i-1];
        if(s[i]=='w'||s[i]=='m')
        {
            flage=false;
            break;
        }

        else if(s[i]=='n'&&s[i-1]=='n'||s[i]=='u'&&s[i-1]=='u')
        {
            dp[i]=(dp[i-1]+dp[i-2])%mod;
        }
    }
    if(flage)
    cout<<dp[len]<<endl;
    else
        cout<<"0"<<endl;
    return 0;
}


#include<vector>
#include<string>
#include<math.h>
#include<algorithm>
#include <iostream>
#include <iomanip>
#include <random>
#include <map>
#include <list>
#include<set>
using namespace std;

#define FOR(n) for(int i=0;i<n;++i)
#define FORj(n) for(int j=0;j<n;++j)
#define pb push_back
#define ll long long
#define vecI vector<int>
#define vecII vector<vector<int>>
#define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define max4(a,b,c,d) max(max3(a,b,c),d)
ll f[100009];
ll p = 1e9 + 7;
int main()
{
	ll k = 0,otv=1;
	f[0] = 1;
	f[1] = 1;
	for (int i = 2; i <= 1e5 + 7; ++i)f[i] = (f[i - 1] + f[i - 2]) % p;
	string s;
	cin >> s;
	FOR(size(s))
		if (s[i] == 'm' || s[i]=='w')
		{
			cout << 0;
			return 0;
		}
		else if (s[i] == 'n')
		{
			if (i > 0)if (s[i - 1] == 'u')
			{
				otv = (otv*f[k]) % p;
				k = 0;
			}
			k++;
		}
		else if (s[i] == 'u')
		{
			if (i > 0)if (s[i - 1] == 'n')
			{
				otv = (otv*f[k]) % p;
				k = 0;
			}
			k++;
		}
		else
		{
			otv = (otv*f[k]) % p;
			k = 0;
		}
	otv = (otv*f[k]) % p;
	cout << otv;
}


#include<vector>
#include<string>
#include<math.h>
#include<algorithm>
#include <iostream>
#include <iomanip>
#include <random>
#include <map>
#include <list>
#include<set>
using namespace std;

#define FOR(n) for(int i=0;i<n;++i)
#define FORj(n) for(int j=0;j<n;++j)
#define pb push_back
#define ll long long
#define vecI vector<int>
#define vecII vector<vector<int>>
#define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define max4(a,b,c,d) max(max3(a,b,c),d)
int f[100009];
int p = 1e9 + 7;
int main()
{
	int k = 0,otv=1;
	f[0] = 1;
	f[1] = 1;
	for (int i = 2; i <= 1e5 + 7; ++i)f[i] = (f[i - 1] + f[i - 2]) % p;
	string s;
	cin >> s;
	FOR(size(s))
		if (s[i] == 'm' || s[i]=='w')
		{
			cout << 0;
			return 0;
		}
		else if (s[i] == 'n')
		{
			if (i > 0)if (s[i - 1] == 'u')
			{
				otv = (otv*f[k]) % p;
				k = 0;
			}
			k++;
		}
		else if (s[i] == 'u')
		{
			if (i > 0)if (s[i - 1] == 'n')
			{
				otv = (otv*f[k]) % p;
				k = 0;
			}
			k++;
		}
		else
		{
			otv = (otv*f[k]) % p;
			k = 0;
		}
	otv = (otv*f[k]) % p;
	cout << otv;
}


#include <iostream>
#include <cmath>
#include <string>
using namespace std;
const long int maxi=1000000007;
int main()
{
	int i=0,j;
	long int p=1;
	string T;
	cin>>T;
	while(i<(int)(T.length()))
	{
	          if(T[i]=='m'|| T[i]=='w')
	          {
	             cout<<0<<endl;
	             return 0;
	          }
		if(T[i]=='u'|| T[i]=='n')
		{
			j=i;
			while(T[i]==T[j] && i<(int)(T.length()))
			{
				i++;
			}
			p*=(pow((1+sqrt(5))/2,i-j+1)-pow((1-sqrt(5))/2,i-j+1))/sqrt(5);
		}
		else
		   i++;
	}
	cout<<p%maxi<<endl;
}


#include <iostream>
#include <string>
using namespace std;
const  unsigned long long int maxi=1000000007;
int main()
{
    unsigned long long int i=0,j;
	string T;
	cin>>T;
	int p[(int)(T.length())+1];
	p[1]=1;
	p[2]=2;
	p[3]=3;
	unsigned long long int f=4;
	int ans=1;
	while(i<(int)(T.length()))
	{
          if(T[i]=='m'|| T[i]=='w')
          {
             cout<<0<<endl;
             return 0;
          }
		if(T[i]=='u'|| T[i]=='n')
		{
			j=i;
			while(T[i]==T[j] && i<(int)(T.length()))
			{
				i++;
			}
			for(;f<=i-j;f++)
			{
				p[f]=(p[f-1]+p[f-2])%maxi;
			}
			ans=((ans%maxi)*(p[i-j]%maxi))%maxi;
		}
		else
		   i++;
	}
	cout<<ans<<endl;
}


#include <iostream>
#include <string>
using namespace std;
const  unsigned long long int maxi=1000000007;
int main()
{
    unsigned long long int i=0,j;
	string T;
	cin>>T;
	int ans=(int)(T.length())+1;
	int p[ans+2];
	p[1]=1;
	p[2]=2;
	p[3]=3;
	ans=1;
	unsigned long long int f=4;
	while(i<(int)(T.length()))
	{
          if(T[i]=='m'|| T[i]=='w')
          {
             cout<<0<<endl;
             return 0;
          }
		if(T[i]=='u'|| T[i]=='n')
		{
			j=i;
			while(T[i]==T[j] && i<(int)(T.length()))
			{
				i++;
			}
			for(;f<=i-j;f++)
			{
				p[f]=(p[f-1]+p[f-2])%maxi;
			}
			ans=((ans%maxi)*(p[i-j]%maxi))%maxi;
		}
		else
		   i++;
	}
	cout<<ans<<endl;
}


#include <iostream>
#include <string>
using namespace std;
const long int maxi=1000000007;
int f(int a)
{
	if(a==1)
	   return 1;
	if(a==2)
	   return 2;
	return f(a-1)+f(a-2);
}
int main()
{
	int i=0,j;
	int p=1;
	string T;
	cin>>T;
	while(i<(int)(T.length()))
	{
	          if(T[i]=='m'|| T[i]=='w')
	          {
	             cout<<0<<endl;
	             return 0;
	          }
		if(T[i]=='u'|| T[i]=='n')
		{
			j=i;
			while(T[i]==T[j] && i<(int)(T.length()))
			{
				i++;
			}
			p*=f(i-j);
		}
		else
		   i++;
	}
	cout<<p%maxi<<endl;
}


#include <iostream>
#include <cmath>
#include <string>
using namespace std;
const long int maxi=1000000007;
int main()
{
	int i=0,j;
	int p=1;
	string T;
	cin>>T;
	while(i<(int)(T.length()))
	{
	          if(T[i]=='m'|| T[i]=='w')
	          {
	             cout<<0<<endl;
	             return 0;
	          }
		if(T[i]=='u'|| T[i]=='n')
		{
			j=i;
			while(T[i]==T[j] && i<(int)(T.length()))
			{
				i++;
			}
			p*=(pow((1+sqrt(5))/2,i-j+1)-pow((1-sqrt(5))/2,i-j+1))/sqrt(5);
		}
		else
		   i++;
	}
	cout<<p%maxi<<endl;
}


#include <iostream>
#include <cmath>
#include <string>
using namespace std;
const  unsigned long long int maxi=1000000007;
int main()
{
    unsigned long long int i=0,j;
	string T;
	cin>>T;
	unsigned long long int p[(int)(T.length())+1];
	p[1]=1;
	p[2]=2;
	p[3]=3;
	unsigned long long int f=4;
	int ans=1;
	while(i<(int)(T.length()))
	{
          if(T[i]=='m'|| T[i]=='w')
          {
             cout<<0<<endl;
             return 0;
          }
		if(T[i]=='u'|| T[i]=='n')
		{
			j=i;
			while(T[i]==T[j] && i<(int)(T.length()))
			{
				i++;
			}
			for(;f<=i-j;f++)
			{
				p[f]=(p[f-1]+p[f-2])%maxi;
			}
			ans=((ans%maxi)*(p[i-j]%maxi))%maxi;
		}
		else
		   i++;
	}
	cout<<ans<<endl;
}


#include <iostream>
#include <string>
using namespace std;
int f(int a)
{
	if(a==1)
	   return 1;
	if(a==2)
	   return 2;
	return f(a-1)+f(a-2);
}
int main()
{
	int i=0,j;
	int p=1;
	string T;
	cin>>T;
	while(i<(int)(T.length()))
	{
		if(T[i]=='u'|| T[i]=='n')
		{
			j=i;
			while(T[i]==T[j] && i<(int)(T.length()))
			{
				i++;
			}
			p*=f(i-j);
		}
		else
		   i++;
	}
	cout<<p<<endl;
}


#include <iostream>
#include <string>
using namespace std;
const long int maxi=1000000007;
int f(int a)
{
	if(a==1)
	   return 1;
	if(a==2)
	   return 2;
	return f(a-1)+f(a-2);
}
int main()
{
	int i=0,j;
	int p=1;
	string T;
	cin>>T;
	while(i<(int)(T.length()))
	{
	          if(T[i]=='m'|| T[i]=='w')
	             cout<<0<<endl;return 0;
		if(T[i]=='u'|| T[i]=='n')
		{
			j=i;
			while(T[i]==T[j] && i<(int)(T.length()))
			{
				i++;
			}
			p*=f(i-j);
		}
		else
		   i++;
	}
	cout<<p%maxi<<endl;
}


#include <iostream>
#include <string>
using namespace std;
const  unsigned long long int maxi=1000000007;
int main()
{
    unsigned long long int i=0,j;
	string T;
	cin>>T;
	int ans=(int)(T.length())+1;
	int p[ans];
	p[1]=1;
	p[2]=2;
	p[3]=3;
	ans=1;
	unsigned long long int f=4;
	while(i<(int)(T.length()))
	{
          if(T[i]=='m'|| T[i]=='w')
          {
             cout<<0<<endl;
             return 0;
          }
		if(T[i]=='u'|| T[i]=='n')
		{
			j=i;
			while(T[i]==T[j] && i<(int)(T.length()))
			{
				i++;
			}
			for(;f<=i-j;f++)
			{
				p[f]=(p[f-1]+p[f-2])%maxi;
			}
			ans=((ans%maxi)*(p[i-j]%maxi))%maxi;
		}
		else
		   i++;
	}
	cout<<ans<<endl;
}


#include <iostream>
#include <string>
using namespace std;
const int maxi=1000000007;
int main()
{
    int i=0,j;
	string T;
	cin>>T;
	int p[1000000];
	p[1]=1;
	p[2]=2;
	p[3]=3;
	long long int ans=1;
	int f=4;
	while(i<(int)(T.length()))
	{
         if(T[i]=='m'|| T[i]=='w')
         {
            cout<<0<<endl;
            return 0;
         }
		 else if(T[i]=='u'|| T[i]=='n')
		 {
			j=i;
			while(T[i]==T[j] && i<(int)(T.length()))
			{
				i++;
			}
			for(;f<=i-j;f++)
			{
				p[f]=(p[f-1]+p[f-2])%maxi;
			}
			ans=(ans%maxi)*(p[i-j]%maxi);
		}
		else
		   i++;
	}
	cout<<ans%maxi<<endl;
}


#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#pragma comment(linker, "/STACK:1024000000")
#pragma warning( disable : 6031)
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <iostream>
#include <map>
#include <stack>
#include <set>
#include <queue>
#include <numeric>
#include <algorithm>
#include <utility>
#include <bitset>
#include <cmath>
#include <sstream>
#include <functional>
#include <iomanip>
#include <unordered_map>
#include <unordered_set>

#define all(a) (a).begin(),(a).end()
#define sz(a) (int)(a).size()
#define eps (1e-15)
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector< vi > vvi;
typedef vector<double> vd;
typedef vector< vd > vvd;
typedef vector< string > vs;
typedef pair< int, int > pii;
typedef vector< pii > vpii;
const long long mod = int(1e9) + 7;

int main() {
#ifdef LOCAL_MACHINE
	freopen("input.txt", "rt", stdin);
	freopen("output.txt", "wt", stdout);
#endif
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	string s;
	cin >> s;
	if (s.find('m') != string::npos || s.find('w') != string::npos)
	{
		cout << 0 << endl;
		return 0;
	}

	vi dp(sz(s) + 1);
	dp[0] = 1;
	for (int i = 0; i < sz(s); i++)
	{
		if (i > 0 && s[i] == s[i - 1] && (s[i] == 'n' || s[i] == 'u'))
		{
			dp[i + 1] = (dp [i + 1] + dp[i - 1]) % mod;
		}
		dp[i + 1] = (dp[i] + dp[i + 1]) % mod;
	}
	cout << dp[sz(s)];
	return 0;
}


#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <cmath>
#include <stack>
#include <map>
#include <queue>
#include <deque>
#define int unsigned long long
#define double long double
#define toch(n) cout << fixed << setprecision(n);
using namespace std;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
const int INF = 1e18;
const double EPS = 1e-8;
const double PI = 3.1415926535897;
const int mod = 1e9 + 7;

string s;
vi dp;

int f(int n) {
	if (n < 0)
		return 0;
	if (n < 2)
		return 1;
	if (dp[n] != -1)
		return dp[n];
	dp[n] = 0;
	if (s[n -1] == 'n' && s[n - 2] == 'n')
		dp[n] += f(n - 2);
	if (s[n - 1] == 'u' && s[n - 2] == 'u')
		dp[n] += f(n - 2);
	dp[n] += f(n - 1);
	return dp[n] % mod;
}

signed main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin >> s;
	for (auto c : s)
		if (c == 'm' || c == 'w') {
			cout << 0;
			return 0;
		}
	int n = s.length();
	dp.assign(n + 1, -1);
	cout << f(n);
}


#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <cmath>
#include <stack>
#include <map>
#include <queue>
#include <deque>
#define int unsigned long long
#define double long double
#define toch(n) cout << fixed << setprecision(n);
using namespace std;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
const int INF = 1e18;
const double EPS = 1e-8;
const double PI = 3.1415926535897;
const int mod = 1e9 + 7;

string s;
vi dp;

int f(int n) {
	if (n < 0)
		return 0;
	if (n < 2)
		return 1;
	if (dp[n] != -1)
		return dp[n];
	dp[n] = 0;
	if (s[n -1] == 'n' && s[n - 2] == 'n')
		dp[n] += f(n - 2);
	if (s[n - 1] == 'u' && s[n - 2] == 'u')
		dp[n] += f(n - 2);
	dp[n] += f(n - 1);
	return dp[n];
}

signed main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin >> s;
	for (auto c : s)
		if (c == 'm' || c == 'w') {
			cout << 0;
			return 0;
		}
	int n = s.length();
	dp.assign(n + 1, -1);
	cout << f(n);
}


// 有m就不合法

#include <iostream>
#include <string>
#include <cstring>
using namespace std;
const int M = 1e9 + 7;
const int N = 1e5 + 10;
int f[N];
char s[N];
int main()
{
    //string s;
    cin >> (s + 1);
    int n = strlen(s + 1);
    f[0] = 1;
    f[1] = 1;
    if(s[1] == 'm'){
        cout << 0 <<endl;
        return 0;
    }
    for(int i = 2;i <= n;i ++)
    {
        f[i] = (f[i] + f[i - 1]) % M;
        if(s[i] == 'n'){
            if(s[i - 1] == 'n')f[i] = (f[i] + f[i - 2]) % M;
        }else if(s[i] == 'u')
        {
            if(s[i - 1] == 'u')f[i] = (f[i] + f[i - 2]) % M;
        }else if(s[i] == 'w' || s[i] == 'm')
        {
            cout << 0 << endl;
            return 0;
        }
    }
    ///cout << f[2] << endl;
    cout << f[n] << endl;
    return 0;
}


// 有m就不合法

#include <iostream>
#include <string>
#include <cstring>
using namespace std;
const int M = 1e9 + 7;
const int N = 1e5 + 10;
int f[N];
char s[N];
int main()
{
    //string s;
    cin >> (s + 1);
    int n = strlen(s + 1);
    //f[0] = 0;
    f[1] = 1;
    for(int i = 2;i <= n;i ++)
    {
        if(s[i] == 'n'){
            if(s[i - 1] == 'n'){
                f[i] = (f[i - 2] + f[i - 1]) % M;
            }else{
                f[i] = f[i - 1];
            }
        }else if(s[i] == 'u'){
            if(s[i - 1] == 'u')
            {
                f[i] = (f[i - 2] + f[i - 1]) % M;
            }else{
                f[i] = f[i - 1];
            }
        }else if(s[i] != 'w' && s[i] != 'm'){
            f[i] = f[i - 1];
        }else{
            cout << 0 << endl;
            return 0;
        }
    }
    cout << f[n] << endl;
    return 0;
}


// 有m就不合法

#include <iostream>
#include <string>
#include <cstring>
using namespace std;
const int M = 1e9 + 7;
const int N = 1e5 + 10;
int f[N];
char s[N];
int main()
{
    //string s;
    cin >> (s + 1);
    int n = strlen(s + 1);
    f[0] = 1;
    f[1] = 1;
    if(s[1] == 'm' || s[1] == 'w'){
        cout << 0 <<endl;
        return 0;
    }
    for(int i = 2;i <= n;i ++)
    {
        f[i] = (f[i] + f[i - 1]) % M;
        if(s[i] == 'n'){
            if(s[i - 1] == 'n')f[i] = (f[i] + f[i - 2]) % M;
        }else if(s[i] == 'u')
        {
            if(s[i - 1] == 'u')f[i] = (f[i] + f[i - 2]) % M;
        }else if(s[i] == 'w' || s[i] == 'm')
        {
            cout << 0 << endl;
            return 0;
        }
    }
    ///cout << f[2] << endl;
    cout << f[n] << endl;
    return 0;
}


// 有m就不合法

#include <iostream>
#include <string>
#include <cstring>
using namespace std;
const int M = 1e9 + 7;
const int N = 1e5 + 10;
int f[N];
char s[N];
int main()
{
    //string s;
    cin >> (s + 1);
    int n = strlen(s + 1);
    //f[0] = 0;
    f[1] = 1;
    for(int i = 2;i <= n;i ++)
    {
        if(s[i] == 'n'){
            if(s[i - 1] == 'n'){
                f[i] = (f[i - 2] * 2 + f[i - 1]) % M;
            }else{
                f[i] = f[i - 1];
            }
        }else if(s[i] == 'u'){
            if(s[i - 1] == 'u')
            {
                f[i] = (f[i - 2] * 2 + f[i - 1]) % M;
            }else{
                f[i] = f[i - 1];
            }
        }else if(s[i] != 'w' && s[i] != 'm'){
            f[i] = f[i - 1];
        }else{
            cout << 0 << endl;
            return 0;
        }
    }
    cout << f[n] << endl;
    return 0;
}


// 有m就不合法

#include <iostream>
#include <string>
#include <cstring>
using namespace std;
const int M = 1e9 + 7;
const int N = 1e5 + 10;
int f[N];
char s[N];
int main()
{
    //string s;
    cin >> (s + 1);
    int n = strlen(s + 1);
    f[0] = 1;
    f[1] = 1;
    for(int i = 2;i <= n;i ++)
    {
        f[i] += f[i - 1];
        if(s[i] == 'n'){
            if(s[i - 1] == 'n')f[i] += f[i - 2];
        }else if(s[i] == 'u')
        {
            if(s[i - 1] == 'u')f[i] += f[i - 2];
        }else if(s[i] == 'w' || s[i] == 'm')
        {
            cout << 0 << endl;
            return 0;
        }
    }
    ///cout << f[2] << endl;
    cout << f[n] << endl;
    return 0;
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

int m = 1000000007;

int safe_add(int a, int b) {
	return (int)((1ll * a + b) % m);
}

int main()
{
	string s;
	cin >> s;

	bool possible = true;
	if (s.find('m', 0) <= s.length() || s.find('w', 0) <= s.length()) {
		possible = false;
	}

	vector<int> res(s.length(), 0);

	res[0] = 1;
	if ((s[1] == 'u' && s[0] == 'u')
		|| (s[1] == 'n' && s[0] == 'n')) {
		res[1] = 2;
	}
	else {
		res[1] = 1;
	}

	for (int i = 2; i < s.length(); i++) {
		char cur = s[i], prev = s[i - 1];
		if ((cur == 'u' && prev == 'u')
			|| (cur == 'n' && prev == 'n')) {
			res[i] = res[i - 1] + res[i - 2];
		}
		else {
			res[i] = res[i - 1];
		}
	}

	if (possible)
		cout << res[s.length() - 1] << endl;
	else
		cout << 0;
}


#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

int m = 1000000007;

int safe_add(int a, int b) {
	return (int)((1ll * a + b) % m);
}

int main()
{
	string s;
	cin >> s;

	bool possible = true;
	if (s.find('m', 0) <= s.length() || s.find('w', 0) <= s.length()) {
		possible = false;
	}

	vector<int> res(s.length(), 0);

	res[0] = 1;
	if ((s[1] == 'u' && s[0] == 'u')
		|| (s[1] == 'n' && s[0] == 'n')) {
		res[1] = 2;
	}
	else {
		res[1] = 1;
	}

	for (int i = 2; i < s.length(); i++) {
		char cur = s[i], prev = s[i - 1];
		if ((cur == 'u' && prev == 'u')
			|| (cur == 'n' && prev == 'n')) {
			res[i] = safe_add(res[i - 1], res[i - 2]);
		}
		else {
			res[i] = res[i - 1];
		}
	}

	if (possible)
		cout << res[s.length() - 1] << endl;
	else
		cout << 0;
}


#include<vector>
#include<iostream>
#include<algorithm>
#include<string>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
#include<numeric>
#include<iomanip>
#include<functional>
using namespace std;

constexpr long long  mod = 1e9 + 7;
long long  a[100001]{ 0,1,2,3 };
void init() {
	for (int i = 4; i <= 100000; i++) {
		a[i] = ((2 * a[i - 2]) % mod + a[i - 3]) % mod;
	}
}
int main() {
	init();
	string s;
	cin >> s;
	for (auto&el : s) {
		if (el == 'w' || el == 'm') {
			cout << 0 << endl;
			exit(0);
		}
	}
	long long  ans = 1;
	for (int i = 0; i < s.size(); ++i) {
		int count = 2;
		if (s[i] == 'u'&&s[i + 1] == 'u') {
			for (i += 2; i < s.size() && s[i] == 'u'; ++i) {
				++count;
			}
			ans = (ans*a[count]) % mod;
			i--;
		}
		else if (s[i] == 'n' && s[i + 1] == 'n') {
			for (i += 2; i < s.size() && s[i] == 'n'; ++i) {
				++count;
			}
			ans = (ans*a[count]) % mod;
			i--;
		}
	}
	cout << ans << endl;
	return 0;
}


#include<vector>
#include<iostream>
#include<algorithm>
#include<string>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
#include<numeric>
#include<iomanip>
#include<functional>
using namespace std;
/*
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	int t;
	cin >> t;
	while (t--) {
		int rock = 0, paper = 0, sci = 0, Brock = 0, Bpaper = 0, Bsci = 0, n = 0;
		cin >> n >> rock >> paper >> sci;
		string Bob;
		cin >> Bob;
		for (auto&el : Bob) {
			if (el == 'R')Brock++;
			else if (el == 'P')Bpaper++;
			else if (el == 'S') Bsci++;
		}
		string Alice;
		int wins = 0;
		for (auto&el : Bob) {
			if (el == 'R') {
				Brock--;
				if (paper) {
					paper--;
					wins++;
					Alice += 'P';
				}
				else if (rock&&sci) {
					if (Bpaper >= Bsci) {
						rock--;
						Alice += 'R';
					}
					else if (Bpaper < Bsci) {
						sci--;
						Alice += 'S';
					}
				}
				else if (!rock) {
					sci--;
					Alice += 'S';
				}
				else {
					rock--;
					Alice += 'R';
				}
			}

			else if (el == 'P') {
				Bpaper--;
				if (sci) {
					sci--;
					wins++;
					Alice += 'S';
				}
				else if (rock&&paper) {
					if (Brock > Bsci) {
						rock--;
						Alice += 'R';
					}
					else {
						paper--;
						Alice += 'P';
					}
				}
				else if (!paper) {
					rock--;
					Alice += 'R';
				}
				else {
					paper--;
					Alice += 'P';
				}
			}

			else if (el == 'S') {
				Bsci--;
				if (rock) {
					rock--;
					wins++;
					Alice += 'R';
				}
				else if (sci&&paper) {
					if (Bpaper > Brock) {
						paper--;
						Alice += 'P';
					}
					else {
						sci--;
						Alice += 'S';
					}
				}
				else if (!paper) {
					sci--;
					Alice += 'S';
				}
				else {
					paper--;
					Alice += 'P';
				}
			}
		}
		if (wins >= ceil(n / 2.f)) {
			cout << "YES" << endl << Alice << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	system("pause");
	return 0;
}

*/

constexpr long long  mod = 1e9 + 7;
long long  a[100001]{ 0,1,2,3 };
void init() {
	for (int i = 4; i <= 100000; i++) {
		a[i] = ((2 * a[i - 2]) % mod + a[i - 3]) % mod;
	}
}
int main() {
	init();
	string s;
	cin >> s;
	for (auto&el : s) {
		if (el == 'w' || el == 'm') {
			cout << 0 << endl;
			exit(0);
		}
	}
	long long  ans = 1;
	for (int i = 0; i < s.size(); ++i) {
		int count = 2;
		if (s[i] == 'u'&&s[i + 1] == 'u'  ) {
			for (i += 2; i < s.size() && s[i] == 'u'; ++i) {
				++count;
			}
			ans = (ans*a[count]) % mod;
		}
		else if (s[i] == 'n' && s[i + 1] == 'n') {
			for (i += 2; i < s.size() && s[i] == 'n'; ++i) {
				++count;
			}
			ans = (ans*a[count]) % mod;
		}
	}
	cout << ans << endl;
	return 0;
}


#include<vector>
#include<iostream>
#include<algorithm>
#include<string>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
#include<numeric>
#include<iomanip>
#include<functional>
using namespace std;
/*
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	int t;
	cin >> t;
	while (t--) {
		int rock = 0, paper = 0, sci = 0, Brock = 0, Bpaper = 0, Bsci = 0, n = 0;
		cin >> n >> rock >> paper >> sci;
		string Bob;
		cin >> Bob;
		for (auto&el : Bob) {
			if (el == 'R')Brock++;
			else if (el == 'P')Bpaper++;
			else if (el == 'S') Bsci++;
		}
		string Alice;
		int wins = 0;
		for (auto&el : Bob) {
			if (el == 'R') {
				Brock--;
				if (paper) {
					paper--;
					wins++;
					Alice += 'P';
				}
				else if (rock&&sci) {
					if (Bpaper >= Bsci) {
						rock--;
						Alice += 'R';
					}
					else if (Bpaper < Bsci) {
						sci--;
						Alice += 'S';
					}
				}
				else if (!rock) {
					sci--;
					Alice += 'S';
				}
				else {
					rock--;
					Alice += 'R';
				}
			}

			else if (el == 'P') {
				Bpaper--;
				if (sci) {
					sci--;
					wins++;
					Alice += 'S';
				}
				else if (rock&&paper) {
					if (Brock > Bsci) {
						rock--;
						Alice += 'R';
					}
					else {
						paper--;
						Alice += 'P';
					}
				}
				else if (!paper) {
					rock--;
					Alice += 'R';
				}
				else {
					paper--;
					Alice += 'P';
				}
			}

			else if (el == 'S') {
				Bsci--;
				if (rock) {
					rock--;
					wins++;
					Alice += 'R';
				}
				else if (sci&&paper) {
					if (Bpaper > Brock) {
						paper--;
						Alice += 'P';
					}
					else {
						sci--;
						Alice += 'S';
					}
				}
				else if (!paper) {
					sci--;
					Alice += 'S';
				}
				else {
					paper--;
					Alice += 'P';
				}
			}
		}
		if (wins >= ceil(n / 2.f)) {
			cout << "YES" << endl << Alice << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	system("pause");
	return 0;
}

*/

const int mod = 1e9 + 7;
int a[100001]{ 0,1,2,3 };
void init() {
	for (int i = 4; i <= 100000; i++) {
		a[i] = ((2 * a[i - 2]) % mod + a[i - 3]) % mod;
	}
}
int main() {
	init();
	string s;
	cin >> s;
	for (auto&el : s) {
		if (el == 'w' || el == 'm') {
			cout << 0 << endl;
			exit(0);
		}
	}
	int ans = 1;
	for (int i = 0; i < s.size(); ++i) {
		int count = 2;
		if (s[i] == 'u'&&s[i + 1] == 'u'  ) {
			for (i += 2; i < s.size() && s[i] == 'u'; ++i) {
				++count;
			}
			ans = (ans*a[count]) % mod;
		}
		else if (s[i] == 'n' && s[i + 1] == 'n') {
			for (i += 2; i < s.size() && s[i] == 'n'; ++i) {
				++count;
			}
			ans = (ans*a[count]) % mod;
		}
	}
	cout << ans << endl;
	return 0;
}


#include<iostream>
#include <vector>
using namespace std;

vector<int> binaryVector;

void showVector(vector<int> v) {
	for(int i = 0; i < v.size(); i++){

		cout << v[i];

	}
}

void Swap(int* a, int* b) {
	int temp;
	temp = *a;
	*a = *b;
	*b = temp;
}

void reverseVector(int* a, int* b) {
	while(a < b) {
		Swap(a++, b--);
	}
}

int all_path(vector<int>& first_path) {
	bool hasNext=true;
	int counter=1;
	int *the_end = &first_path[first_path.size() - 1];
	int* x = &first_path[first_path.size() - 1];
	int * m= &first_path[first_path.size() - 1];
	int * n = &first_path[first_path.size() - 2];
	while (hasNext) {
		if (*m <= *n) {
			//cout <<"m&n is:"<< *m << *n<<endl;
			m--; n--;
			if (m == &first_path[0]) {
				hasNext = false;
				break;
			}
		}
		else {

			counter++;
			while (*x != 1) {
				x--;
			}
			Swap(n, x);
			reverseVector(m, the_end);

			the_end = &first_path[first_path.size() - 1];
			x = &first_path[first_path.size() - 1];
			m = &first_path[first_path.size() - 1];
			n = &first_path[first_path.size() - 2];

		}
	}
	return counter;
}

int calculate(int numbers) {
	//����numbers�� ���ڵ�u����v ���ж��������п���
	if (numbers == 2) {
		return 2;
	}
	else {
		int result = 1;
		int max_big_number = numbers / 2;

		for (int i = 1; i <= max_big_number; i++) {

			binaryVector.clear();
			int j = numbers - 2 * i;
			//�൱�� i����ͬ��Բ��j����ͬСԲ�������ظ�ȫ����

			for (int k = 0; k < i; k++) {
				binaryVector.push_back(0);
			}

			for (int l = 0; l < j; l++) {
				binaryVector.push_back(1);
			}
			result = result + all_path(binaryVector);
			/*cout << endl << "now result:" << result<<endl;
			cout << endl << "----------------------" << endl;
			showVector(binaryVector);
			cout << endl << "----------------------";*/
		}

		return result;
	}

}

char s[100001];
int main() {
//	cout << "Please input string"<<endl;

	gets_s(s);

	int sum = 1;

	char* p, * q;
	p = s;
	q = p+1;

	while (*q != '\0') {
		if (*q == 'm' || *q == 'w' || *p == 'm' || *p == 'w') {
			sum = 0;
			break;
		}
		else {
			if (*p == 'u'&&*q=='u') {//�������������ڵ�u�Żᴥ��

				int counter2 = 2;
				q++;
				while (*q == 'u') {
					counter2++;
					q++;
				}

				sum = sum * calculate(counter2);
				p = q;
				q++;
			}
			else if (*p == 'n' && *q == 'n') {
				int counter3 = 2;
				q++;
				while (*q == 'n') {
					counter3++;
					q++;
				}
				sum = sum * calculate(counter3);
				p = q;
				q++;
			}
			else {
				p++;
				q++;
			}
		}
	}
	cout << sum;
}


#include <iostream>
#include <vector>

using namespace std;

const int N = 1e6 + 5, MOD = 1e9 + 7;

int main()
{
    char s[N];
    long long dp[N];
    scanf_s("%s", s);
    int n = strlen(s);
    for (int i = 0; i < n; ++i) {
        if (s[i] == 'w' || s[i] == 'm') return printf("0\n"), 0;
    }
    dp[1] = 1, dp[2] = 2;
    for (int i = 3; i <= n; ++i) dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;

    long long ans = 1;
    for (int i = 0; i < n; ++i) {
        if (s[i] == 'u' || s[i] == 'n') {
            int j = i;
            while (j < n && s[j] == s[i]) j++;
            ans = ans * (dp[j - i]) % MOD;
            // cout << j << " " << i << endl;
            i = j - 1;
        }
    }
    printf("%lld\n", ans);
}


#include<iostream>
#include <vector>
using namespace std;

vector<int> binaryVector;

void showVector(vector<int> v) {
	for(int i = 0; i < v.size(); i++){

		cout << v[i];

	}
}

void Swap(int* a, int* b) {
	int temp;
	temp = *a;
	*a = *b;
	*b = temp;
}

void reverseVector(int* a, int* b) {
	while(a < b) {
		Swap(a++, b--);
	}
}

int all_path(vector<int>& first_path) {
	bool hasNext=true;
	int counter=1;
	int *the_end = &first_path[first_path.size() - 1];
	int* x = &first_path[first_path.size() - 1];
	int * m= &first_path[first_path.size() - 1];
	int * n = &first_path[first_path.size() - 2];
	while (hasNext) {
		if (*m <= *n) {
			//cout <<"m&n is:"<< *m << *n<<endl;
			m--; n--;
			if (m == &first_path[0]) {
				hasNext = false;
				break;
			}
		}
		else {

			counter++;
			while (*x != 1) {
				x--;
			}
			Swap(n, x);
			reverseVector(m, the_end);

			the_end = &first_path[first_path.size() - 1];
			x = &first_path[first_path.size() - 1];
			m = &first_path[first_path.size() - 1];
			n = &first_path[first_path.size() - 2];

		}
	}
	return counter;
}

int calculate(int numbers) {
	//����numbers�� ���ڵ�u����v ���ж��������п���
	if (numbers == 2) {
		return 2;
	}
	else {
		int result = 1;
		int max_big_number = numbers / 2;

		for (int i = 1; i <= max_big_number; i++) {

			binaryVector.clear();
			int j = numbers - 2 * i;
			//�൱�� i����ͬ��Բ��j����ͬСԲ�������ظ�ȫ����

			for (int k = 0; k < i; k++) {
				binaryVector.push_back(0);
			}

			for (int l = 0; l < j; l++) {
				binaryVector.push_back(1);
			}
			result = result + all_path(binaryVector);
			/*cout << endl << "now result:" << result<<endl;
			cout << endl << "----------------------" << endl;
			showVector(binaryVector);
			cout << endl << "----------------------";*/
		}

		return result;
	}

}

int main() {
//	cout << "Please input string"<<endl;
	char s[100];
	gets_s(s);

	int sum = 1;

	char* p, * q;
	p = s;
	q = p+1;

	while (*q != '\0') {
		if (*q == 'm' || *q == 'w' || *p == 'm' || *p == 'w') {
			sum = 0;
			break;
		}
		else {
			if (*p == 'u'&&*q=='u') {//�������������ڵ�u�Żᴥ��

				int counter2 = 2;
				q++;
				while (*q == 'u') {
					counter2++;
					q++;
				}

				sum = sum * calculate(counter2);
				p = q;
				q++;
			}
			else if (*p == 'n' && *q == 'n') {
				int counter3 = 2;
				q++;
				while (*q == 'n') {
					counter3++;
					q++;
				}
				sum = sum * calculate(counter3);
				p = q;
				q++;
			}
			else {
				p++;
				q++;
			}
		}
	}
	cout << sum;
}


#include<iostream>
#include <vector>
using namespace std;

vector<int> binaryVector;

void showVector(vector<int> v) {
	for(int i = 0; i < v.size(); i++){

		cout << v[i];

	}
}

void Swap(int* a, int* b) {
	int temp;
	temp = *a;
	*a = *b;
	*b = temp;
}

void reverseVector(int* a, int* b) {
	while(a < b) {
		Swap(a++, b--);
	}
}

int all_path(vector<int>& first_path) {
	bool hasNext=true;
	int counter=1;
	int *the_end = &first_path[first_path.size() - 1];
	int* x = &first_path[first_path.size() - 1];
	int * m= &first_path[first_path.size() - 1];
	int * n = &first_path[first_path.size() - 2];
	while (hasNext) {
		if (*m <= *n) {
			//cout <<"m&n is:"<< *m << *n<<endl;
			m--; n--;
			if (m == &first_path[0]) {
				hasNext = false;
				break;
			}
		}
		else {

			counter++;
			while (*x != 1) {
				x--;
			}
			Swap(n, x);
			reverseVector(m, the_end);

			the_end = &first_path[first_path.size() - 1];
			x = &first_path[first_path.size() - 1];
			m = &first_path[first_path.size() - 1];
			n = &first_path[first_path.size() - 2];

		}
	}
	return counter;
}

int calculate(int numbers) {
	//����numbers�� ���ڵ�u����v ���ж��������п���
	if (numbers == 2) {
		return 2;
	}
	else {
		int result = 1;
		int max_big_number = numbers / 2;

		for (int i = 1; i <= max_big_number; i++) {

			binaryVector.clear();
			int j = numbers - 2 * i;
			//�൱�� i����ͬ��Բ��j����ͬСԲ�������ظ�ȫ����

			for (int k = 0; k < i; k++) {
				binaryVector.push_back(0);
			}

			for (int l = 0; l < j; l++) {
				binaryVector.push_back(1);
			}
			result = result + all_path(binaryVector);
			/*cout << endl << "now result:" << result<<endl;
			cout << endl << "----------------------" << endl;
			showVector(binaryVector);
			cout << endl << "----------------------";*/
		}

		return result;
	}

}

int main() {
	cout << "Please input string"<<endl;
	char s[100];
	gets_s(s);

	int sum = 1;

	char* p, * q;
	p = s;
	q = p+1;

	while (*q != '\0') {
		if (*q == 'm' || *q == 'w' || *p == 'm' || *p == 'w') {
			sum = 0;
			break;
		}
		else {
			if (*p == 'u'&&*q=='u') {//�������������ڵ�u�Żᴥ��

				int counter2 = 2;
				q++;
				while (*q == 'u') {
					counter2++;
					q++;
				}

				sum = sum * calculate(counter2);
				p = q;
				q++;
			}
			else if (*p == 'n' && *q == 'n') {
				int counter3 = 2;
				q++;
				while (*q == 'n') {
					counter3++;
					q++;
				}
				sum = sum * calculate(counter3);
				p = q;
				q++;
			}
			else {
				p++;
				q++;
			}
		}
	}
	cout << sum;
}


//Env: Visual Studio 2019

#include <iostream>
#include <string>
#define mod 1000000007
using namespace std;

int cal(int count)
{
	//쳲���������
	int a = 0;
	int b = 1;
	while (count-- > 0)
	{
		b += a;
		a = b - a;
	}
	return b;
}

int test2(string s)
{
	int count_n = 0;
	int count_u = 0;
	int result = 1;
	int i = 0;
	while (i < s.size())
	{
		//unexpected character
		if (s[i] == 'm' || s[i] == 'w')
		{
			return 0;
		}

		//'n' is detected
		else if (s[i] == 'n')
		{
			count_n++;
			if (count_u > 0)
			{
				result *= cal(count_u);
				result %= mod;
				count_u = 0;
			}
		}

		//'u' is detected
		else if (s[i] == 'u')
		{
			count_u++;
			if (count_n > 0)
			{
				result *= cal(count_n);
				result %= mod;
				count_n = 0;
			}
		}

		//neither 'n' nor 'u'
		else
		{
			if (count_n > 0)
			{
				result *= cal(count_n);
				result %= mod;
				count_n = 0;
			}
			else if (count_u > 0)
			{
				result *= cal(count_u);
				result %= mod;
				count_u = 0;
			}
		}
		i++;
	}
	if (count_n > 0)
	{
		result *= cal(count_n);
		result %= mod;
	}
	else if (count_u > 0)
	{
		result *= cal(count_u);
		result %= mod;
	}
	return result;
}
int main()
{
	string s;
	cin >> s;
	int result = test2(s);
	cout << result << endl;
}