WWOJ

1070: 摆渡车

Time Limit:  1 Sec    Memory Limit:   128 MB
Submission:44     AC:19     Score:100.00


Description

Input

Output

Samples

input:
5 1 3 4 4 3 5
output:
0

Hint

Source