Problems
Olympiad
Olympiad
At the Olympiad in Informatics, participants were asked to \textbf{N} tasks on \textbf{A}\[\textbf{i}\] (\textbf{i}=\textbf{1}..\textbf{N}). Olympian Peter figured while \textbf{B}\[\textbf{i}\] the time it takes for him to solve each problem. What is the maximum amount of points can collect Peter, if Olympics last \textbf{H} hours?
\InputFile
The first line of the file recorded the number \textbf{N} and \textbf{H}. In the second - the value \textbf{A}\[\textbf{i}\], and the third - \textbf{B}\[\textbf{i}\] (\textbf{i}=\textbf{1}..\textbf{N}). All values are positive integers. \textbf{1} ≤ \textbf{N} ≤ \textbf{100}, \textbf{1} ≤ \textbf{H} ≤ \textbf{10}, \textbf{1} ≤ \textbf{A}\[\textbf{i}\], \textbf{B}\[\textbf{i}\] ≤ \textbf{100}.
\OutputFile
The answer of the problem - the maximum possible score.
Input example #1
4 3 60 90 60 100 30 60 50 80
Output example #1
250