D. 【例58.3】 电梯运行时间

    Type: Default 1000ms 64MiB

【例58.3】 电梯运行时间

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

The elevator takes 66 seconds to go up one floor, 44 seconds to go down one floor, 55 seconds to open the door once (only if someone is arriving), and an additional 11 second for each person to exit.
It is specifically noted that the elevator starts at the 00th floor and must return to the 00th floor to complete a task. Assuming that the floor each person in the elevator wants to go to is known at the start, can you calculate the total time required to complete this task?

Input Format

The first line contains a positive integer nn (1<n<1051 < n < 10^5), representing the number of people in the elevator.
The second line contains nn positive integers, aia_i (1<ai<1071 < a_i < 10^7), representing the floor the ii-th person wants to go to.

Output Format

A single line containing a positive integer, representing the total time required to complete the task.

Sample

4
3 7 3 1
89

20251018C班作业(3)

Not Claimed
Status
Done
Problem
5
Open Since
2025-10-23 0:00
Deadline
2025-10-30 23:59
Extension
24 hour(s)