It seems that recently Ready to Program has been degrading! Currently, RtP can handle inputs before crashing. However, for each day that passes, the number of inputs decreases by rounded down. Thankfully, uninstalling and reinstalling RtP increases the number of inputs by each time. You know that a huge assignment involving file input and output is arriving soon, so you would like for RtP to be able to handle at least inputs after days. Since you don't want to waste the entire period spam reinstalling RtP, you would like to find out the minimum number of times you have to reinstall RtP each day such that after days, RtP can handle at least inputs.
Constraints
Input Specifications
The first and only line will contain 5 space-separated integers, . Note that is a percentage.
Output Specifications
Output the minimum number of times you have to reinstall RtP each day such that after days, RtP can handle at least inputs.
Sample Input
200 50 50 100 3
Sample Output
1
Sample Case Explanation
After the first day, RtP can handle lines.
After the second day, RtP can handle lines.
After the third day, RtP can handle lines.
Credits to the question "Tree Sustainability" for inspiration.
Comments