题目描述
Problem Description
Takahashi has a "precognition" ability. He is taking $N$ subjects at university and aims to score at least $80$ points in all subjects. According to his "precognition", if he does not study for a subject $i$, he is predicted to score $m_i$ points on the exam for that subject. Takahashi can increase the predicted score by $1$ point for a subject by studying for $1$ minute. Assuming his "precognition" is correct, find the minimum total study time required for Takahashi to achieve his goal.
Input Format
The input is given from the standard input in the following format:
$N$ $m_1$ $m_2$ .. $m_N$
- The first line contains the number of subjects Takahashi is taking, $N$ ($1 \leq N \leq 25$).
- The second line contains the predicted scores $m_i$ ($0 \leq m_i \leq 100$) for each subject $i$ ($1 \leq i \leq N$) without studying, separated by spaces.
Output Format
Output the minimum total study time (in minutes) required for Takahashi to achieve his goal to the standard output, followed by a newline.
Sample Input and Output
Sample Input #1
5
70 90 60 80 50
Sample Output #1
60
Sample Input #2
6
100 100 100 100 100 100
Sample Output #2
0
Notes/Hints
Sample Explanation 1
He needs to study subject $1$ for $10$ minutes, subject $3$ for $20$ minutes, and subject $5$ for $30$ minutes.
Sample Explanation 2
No action is needed.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分