Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register
Language:
Back to Mother Ship
Time Limit: 1000MSMemory Limit: 65536K
Total Submissions: 2465Accepted: 826

Description

Tony is eager to go back to the mother ship. A nearby star exploded a few hours ago, which made hundreds of ships burn to ashes. He doesn't know who did such a stupid thing. Obviously, it helps neither side in the war. Since the star is expanding rapidly, everything in the area is drifting away from the exploding point and Tony's ship is hard to escape. In battlefront under such a situation he may be killed in every minute. He has to go back to the mother ship as soon as possible. But there is a trouble. To flight safely, he must keep contact with the mother ship all the time, but the exploding interrupts the wireless connection. So they just developed a new communication system, which makes use of the power of exploding, but there is one restriction that the distance between mother ship and the exploding point should be equal to the distance between Tony's ship and the exploding point. Fortunately, at this moment, Tony's ship is just on the right position that can communicate with the mother ship.

The mother ship loses its power, so the change of its position is only caused by the power of exploding. We can simply assume the mother ship is drifting away from the exploding point at a constant linear speed u, and has no movement in any other direction. Tony's ship can only move with a constant linear speed 2u. In order to communicate with the mother ship, Tony has to keep the distance to the exploding point as the same as the distance between the mother ship and the exploding point. To achieve this goal, he may need to decide the starting direction and adjust the direction of flight all the time.

Now, according to the devices on the ship, Tony knows the current distance to the exploding point d, the angle a made by mother ship, exploding point and Tony's ship, and the speed u mentioned above. However, he doesn't know how long it will take him to reach the mother ship, so he asks you for help.

Input

The input may contain several sets of test data. Each contains three integer numbers in a single line. The first number is speed u (0 < u < 10000), which takes meter per second as the unit. The second is the angle a (0 < a < 180), which is measured in degree. The last one is d (0 < d < 1000000), which is measured in meter.

A line with three zeros ends the input, and this line should not be processed.

Output

For each test case, if the result is larger than 10000 seconds, you should output a line just containing "God help me!"; otherwise, output the nearest integer to result.

Sample Input

1 57 10
2 114 999999
0 0 0

Sample Output

8
God help me!

Source

[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator