#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define int                 		long long
#define double              		long double
#define endl                		"\n"
#define pb                  		push_back
#define PI                  		3.1415926535897932384626433832795l
#define F                   		first
#define S                   		second
#define mp                  		make_pair
#define f(i,n)              		for(int i=0;i<n;++i)
#define loop(i,a,b)         		for (int i=a ; i<b ;++i)
#define fastio              		ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define all(v)              		(v).begin(),(v).end()
#define rall(v)             		(v).rbegin(),(v).rend()
#define gcd(a,b)            		__gcd((a),(b))
#define fill(a,value)       		memset(a,value,sizeof(a));
#define minn(v)             		*min_element(v.begin(), v.end());
#define maxx(v)             		*max_element(v.begin(), v.end());
#define print(x)            		cout<<(x)<<endl;
typedef pair<int, int>      		pii;
typedef vector<int>         		vi;
const int mod = 1e9 + 7;
const int MOD = 998244353;

int power(int x, int y, int p)
{
	int res = 1;

	x = x % p;

	while (y > 0) {
		if (y & 1)
			res = (res * x) % p;
		y = y >> 1;
		x = (x * x) % p;
	}
	return res;
}
int modInverse(int n, int p)
{
	return power(n, p - 2, p);
}

// Returns nCr % p using Fermat's little
// theorem.
int nCr(int n,  int r, int p)
{
	// Base case
	if (r == 0)
		return 1;
	int fac[n + 1];
	fac[0] = 1;
	for (int i = 1; i <= n; i++)
		fac[i] = (fac[i - 1] * i) % p;

	return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) % p;
}


void solve()
{
	string s;
	cin >> s;
	int ans = 0;
	for (int i = 0; i < 9;)
	{
		if (s[i] == 'Z' and s[i + 1] == 'O' and s[i + 2] == 'N' and s[i + 3] == 'e')
		{
			ans++;
			i += 3;
		}
		else
		{
			i++;
		}

	}
	print(ans)
}


signed main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	fastio;
	cout << fixed << setprecision(12);
	int T = 1;
	//cin >> T;
	f(tc, T)
	{
		//cout << "Case #" << tc + 1 << ": ";
		solve();
	}
	return 0;
}
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define boostIO                   \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0)
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repn(i, n) for (int i = 1; i <= n; i++)
#define rrep(i, b, a) for (int i = b; i >= a; i--)
#define sz(v) (int)(v.size())
#define all(v) v.begin(), v.end()
#define mem0(a) memset(a, 0, sizeof(a))
#define mem1(a) memset(a, -1, sizeof(a))
#define trav(a, x) for (auto &a : x)
#define popcount(x) __builtin_popcountll(x)
#define pb push_back
#define fi first
#define se second
#define mod 1000000007
#define int long long
typedef pair<int, int> pii;
const long long INF = 1e18;
const int N = 1e5 + 5;

signed main() {
    boostIO;
    char c1, c2, c3;
    cin >> c1 >> c2 >> c3;
    if (c1 == c2 && c2 == c3) {
        cout << "Won\n";
    } else {
        cout << "Lost\n";
    }
    return 0;
}
// XD