#P340. 【例58.3】 电梯运行时间

【例58.3】 电梯运行时间

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