eolymp
bolt
Try our new interface for solving problems

168

168

Time limit 1 second
Memory limit 64 MiB
Input example #1
7
14 -10 10 8 11 -9 -6
Output example #1
7 -5 3 1 4 -4 -1
Input example #3
3
0 -6 4
Output example #3
0 -3 2