Trains |

Two towns T1 and T2 are connected through a double railroad. The distance
between T1 and T2 is *d* meters. From T1 to T2 the trains are
leaving every *t*_{1} seconds. From T2 to T1 the trains are leaving
every *t*_{2} seconds. The trains from T1 to T2 have a speed of
*v*_{1} m/s. The trains from T2 to T1 have a speed of *v*_{2} m/s.

Your task is to write a program that computes the number of train ``rendezvous" on
the railroad which links T1 and T2, and which occur during the
time interval [0, *tf*] seconds.

We consider that:

- a)
- at time 0 two trains are leaving (from T1 to T2,
and from T2 to T1);
- b)
- the input and output data are integers.

.

10 5 5 1 1 2

6