The first line contains three integers The second line contains integers .
An integer represents the answer。
1 1 100 5 1 2 3 4 5
84