There are many magical functions in the beautiful world of Mathematics and Computer Science. A magical function is defined as
Given the constants
Input Specification
On the first and only line of input,
Output Specification
Output
Constraints
For all subtasks:
Subtask 1 [10%]
Subtask 2 [30%]
Subtask 3 [60%]
Sample Input
Copy
1 2 3 4 5 6
Sample Output
Copy
95
Comments