AT_past202212_f 平均順位
Description
Snuke played $ N $ matches of a $ 4 $ -player game, and ranked $ 1 $ -st $ A $ times, $ 2 $ -nd $ B $ times, $ 3 $ -rd $ C $ times, and $ 4 $ -th $ D $ times.
Snuke is happy if the value of his average rank is at most $ X $ . At least how many additional matches must be played to make him happy?
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ A $ $ B $ $ C $ $ D $ $ X $
Output Format
Print the answer.
Explanation/Hint
### Sample Explanation 1
Now, the value of his average rank is $ 2.5 $ . If six more matches are played and he ranks $ 1 $ -st in all of them, his average rank will be $ 1.6 $ , which is not greater than $ X=1.600 $ .
### Sample Explanation 2
The value of his average rank is already not greater than $ X=4.000 $ , so no more matches need to be played.
### Constraints
- $ 1\leq N \leq 10^{12} $
- $ 0\leq A,B,C,D \leq 10^{12} $
- $ A+B+C+D=N $
- $ 1< X\leq 4 $
- $ N $ , $ A $ , $ B $ , $ C $ , and $ D $ are given as integers.
- $ X $ is given with three decimal places.