CF609A USB Flash Drives
Description
Sean is trying to save a large file to a USB flash drive. He has $ n $ USB flash drives with capacities equal to $ a_{1},a_{2},...,a_{n} $ megabytes. The file size is equal to $ m $ megabytes.
Find the minimum number of USB flash drives needed to write Sean's file, if he can split the file between drives.
Input Format
The first line contains positive integer $ n $ ( $ 1
Output Format
Print the minimum number of USB flash drives to write Sean's file, if he can split the file between drives.
Explanation/Hint
In the first example Sean needs only two USB flash drives — the first and the third.
In the second example Sean needs all three USB flash drives.
In the third example Sean needs only one USB flash drive and he can use any available USB flash drive — the first or the second.