#P204. 【例34.1】 计分程序

【例34.1】 计分程序

Description

Teacher Yan is teaching C++ programming this semester. His grading system is based on the number of problems each student solves on the OJ (Online Judge). To prevent large score gaps, he doesn't use a fixed score per problem but adjusts the points based on the number of problems solved. The rules are as follows:
For 0-10 problems solved, each problem is worth 6 points.
For 11-20 problems solved, problems 1-10 are still worth 6 points each, and problems 11-20 are worth 2 points each.
For 21-40 problems solved, problems 1-10 are worth 6 points each, problems 11-20 are worth 2 points each, and problems 21-40 are worth 1 point each.
For more than 40 problems solved, the score is 100 points.
This way, solving 10 problems gives 60 points, solving 20 problems gives 80 points, and solving 40 problems gives 100 points, which significantly reduces the score gap between students.
However, with over 600 students, calculating scores manually is very time-consuming. Please write a program to help Teacher Yan calculate the scores.

Input Format

Each test case contains multiple test data sets, with no more than 10 sets in total.
Each test data set contains a single integer N (0≤N≤100), representing the number of problems solved by a student on the OJ.

Output Format

Output the student's score.

Sample

10
40
60
100