403742: GYM101252 E Meetings

Memory Limit:64 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Meetingstime limit per test1 secondmemory limit per test64 megabytesinputinput.txtoutputoutput.txt

Two cities A and B are connected by a straight road that is exactly l meters long. At the initial moment of time a cyclist starts moving from city A to city B at a speed v1 meters/second, and a pedestrian starts moving from city B to city A at a speed v2 meters/second. When one of them reaches a city, the road ends, so the person has to turn around and start moving in the opposite direction by the same road, keeping the original speed. As a result, the cyclist and the pedestrian are traveling between cities A and B indefinitely.

Your task is to calculate the number of times they will meet during the first t seconds. If they meet in exactly t seconds after the initial moment of time, this meeting should also be counted.

Input

The only line of input contains four integer numbers: l, v1, v2 and t. All numbers are between 1 and 109, inclusively.

Output

Print a single integer — the number of times the cyclist and the pedestrian will meet during the first t seconds.

ExamplesInput
1000 10 1 200
Output
2
Input
4 4 3 4
Output
4

加入题单

上一题 下一题 算法标签: