#PU1000. 环岛环形

环岛环形

Description

Format

Input

Output

Samples

4
1
100
4567
3366
0
5
183
60

Limitation

1s, 1024KiB for each test case.