Bicycle
I will ride the bicycle for a long time,
In the quiet meadows, I will stop it.
I will pick flowers and give a bouquet
To the girl I love.
(Aleksandr Barikin,
song "I will ride the bicycle for a long time")
After gathering a bouquet of beautiful wildflowers, the cyclist resumed his journey to his beloved's house along a straight road. At one point, he rode over a white line drawn across the road. Looking back, he noticed that both of his wheels were now leaving white marks (the line was painted!). Despite this, he continued riding along the road. Eventually, he reached the house and stopped, with the front wheel against a vertical wall. The distance between the white line the cyclist crossed and the wall of the house is D. The radii of the front and rear wheels are R_1 and R_2, respectively. The distance between the points where the wheels touch the ground is L.
Write a program that determines the number of white dots left on the road by the bicycle wheels.
Assume that the width of the white stripe is very small, so the marks left by the wheels are dots.
Input
A single line contains four integers R_1, R_2, L, and D (0 < R_1, R_2 <= 100, 2*sqrt(R_1*R_2) < L <= 1000, L + R_1 < D <= 10^9), which define the geometry of the bicycle and the distance from the line to the wall.
Output
Output a single integer - the number of white dots left by the bicycle on the road.