Your school is going to start a new scholarship program. To apply for this scholarship you have to write an application and mention how much scholarship do you need. A lot of students applied for this scholarship and a few of them were selected. Just before issuing the scholarship, the accountant came to know that, the total budget allotment for scholarship has been reduced. So itâ€™s not possible to offer the selected candidates their requested amount. Now if they offer some students less than their requested amount they will become sad. But the Head master wants to minimize the number of sad students. Your task is to write a program for the headmaster. The program will find such a number, that no students will be given more than that amount of money.
First line of input will have at most $100$ integers. These number represents the amount of money requested by each students. Second line will have the new allotted budget. Every number will be >= 0 and < $2^{31}$.
Output will have a number, which is the maximum amount allotted budget for a single student. You have to print two digits after the decimal place.
Input | Output |
---|---|
100 2 50 120 1000 190 | 47.00 |
If we allot at most Tk. 47 for each students, then total expense would be, $47 + 2 + 47 + 47 + 47 = 190$. The student who applied for Tk. 2, he will be given Tk. 2 only, no more than that. |