Olympiad
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
At the Olympiad in Informatics, participants were asked to N tasks on A[i] (i=1..N). Olympian Peter figured while B[i] the time it takes for him to solve each problem. What is the maximum amount of points can collect Peter, if Olympics last H hours?
Input
The first line of the file recorded the number N and H. In the second - the value A[i], and the third - B[i] (i=1..N). All values are positive integers. 1 ≤ N ≤ 100, 1 ≤ H ≤ 10, 1 ≤ A[i], B[i] ≤ 100.
Output
The answer of the problem - the maximum possible score.
Examples
Input #1
Answer #1
Submissions 415
Acceptance rate 26%