eolymp
bolt
Try our new interface for solving problems

F

Time limit 1 second
Memory limit 64 MiB

Всеукраїнська олімпіада 2019

Examples

Input example #1
5 0
1 2 3 4 7
Output example #1
3
14528486
Input example #2
7 0
1 2 10 4 7 3 13
Output example #2
5
14528486