eolymp
bolt
Try our new interface for solving problems
Problems

Coffee

Coffee

Developer Vasiliy is fond of coffee. Folks say that Vasiliy transforms coffee into code. Vasiliy knows that if he drinks a cup of coffee before some task, he will spend \textbf{20}\% less time on that task (in comparison to coffee-less work). He may perform a task even faster because seconds are truncated while calculating that \textbf{20}\%. You must define, in what minimal quantity of workdays (workday lasts \textbf{8} hours) Vasiliy can finish all his tasks, considering that he is able to make exactly \textbf{K} cups of coffee. Vasiliy already knows how long it will take to do every task. The tasks must not be done in parallel. If the remainder of the workday cannot fit a task, Vasiliy may only start it on the next day. Pay attention, that his magical coffee speeds up only one task. Vasiliy must not drink more than one cup of coffee before a single task. \InputFile First line contains three integer numbers \textbf{N}, \textbf{K}, \textbf{L} - number of tasks, number of cups of coffee and time required to make a cup of coffee (\textbf{1} ≤ \textbf{N} ≤ \textbf{1000}, \textbf{0} ≤ \textbf{K} ≤ \textbf{1000}, \textbf{1} ≤ \textbf{L} ≤ \textbf{100}). Next line contains \textbf{N} integer numbers, separated by spaces - the time required to do each task. Time values are given in minutes (not less than \textbf{1}, and not more than \textbf{480} minutes). \OutputFile Output one integer number - minimal quantity of workdays, that are required to finish all Vasiliy's tasks.
Time limit 1 second
Memory limit 64 MiB
Input example #1
5 1 10
10 10 10 100 360
Output example #1
1
Author Черненко Роман
Source Osipovsky Cup - 2013