Welcome to ZOJ
Information
Select Problem
Runs
Ranklist
ZOJ Problem Set - 2290
Game

Time Limit: 2 Seconds      Memory Limit: 65536 KB

Two players(A and B) take turns to take stones form a heap of N stones.

There are some rules:
1.A always takes first. He can take arbitrary number of stones but not all of them.
2.The number of the one who will take should less than or equal the twice of the other one taken last time. But must more than one or one.
3.The one who take take the last one stone is the winner.
4.The two players are clever enough, they can make the best choice.

Input

Every test case has only one line with one integer N(2 <= N <= 100000000), the numbers of the stones.

Output

If A will lose output "lose"

If A can win,output the numbers A should take at the first time. If there are more ways to make A win, output the smallest one.

Sample Input

4

Sample Output

1



Author: YANG, Xuan
Source: ZOJ Monthly, January 2005
Submit    Status