#C3721. Calculate Total Rental Cost
Calculate Total Rental Cost
Calculate Total Rental Cost
You are given a list of integers where each integer represents the number of days a book was rented. The rental cost for a single book is determined as follows:
- If the number of days is less than or equal to 5, the cost is $5.
- If the number of days is greater than 5, the cost is \(5 + (\text{days} - 5)\).
Your task is to calculate the total rental cost for all books.
Note: Even if a book is rented for 0 days, the minimum cost is still $5.
inputFormat
The input is given in the following format from standard input (stdin):
- The first line contains a non-negative integer \(n\) representing the number of books rented.
- If \(n > 0\), the second line contains \(n\) space-separated integers, where each integer represents the number of days a book was rented.
outputFormat
Output the total rental cost as a single integer to the standard output (stdout).
## sample3
4 7 10
22
</p>