Valya loves sandwiches with sausage very much, especially when they are cut like in the picture.
According to Valya’s recipe, one sandwich requires A grams of bread and B grams of sausage. In the nearest store, bread is sold in X-gram loaves and sausage is sold in Y-gram sticks. When Valya runs out of ingredients for the next sandwich, he goes to the store and buys the smallest number of loaves and sticks that is enough to make one sandwich. Initially, he has nothing. It is known that Valya ate exactly N sandwiches. How many times did he go to the store?
Input
The input consists of a single line containing the numbers A, B, X, Y, N in the corresponding order, separated by spaces (1 ≤ A, B ≤ 100; 1 ≤ X, Y, N ≤ 109).
Output
The output should be a single line indicating the number of times Valya went to the store.
Samples
| input | output |
|---|
30 20 90 30 4
| 3
|
5 6 7 72 100
| 74
|
99 100 37 47 1000000000
| 1000000000
|
Notes
Explanation for the first example:
Initially, Valya has nothing, so he goes to the store for one loaf of bread and one stick of sausage, after which he has 90g of bread and 30g of sausage. From this, he can make one sandwich, after which he has 60g of bread and 10g of sausage left. For the next sandwich, he lacks sausage, so Valya goes to the store a second time for one stick of sausage, after which he has 60g of bread and 40g of sausage. From this, he can make 2 sandwiches, after which he has no ingredients left. To make the 4th sandwich, Valya goes to the store for bread and sausage for the third time and prepares it.
Problem Author: Valentin Zuev
Problem Source: University academic school olympiad in informatics 2020