There is a very long road in JOI City, which can be considered as the real number line. A position on the road is represented by a real number coordinate. In JOI City, there are N sightseeing spots along the road, numbered from 1 to N in ascending order of the coordinates. The coordinate of the i-th sightseeing spot (1≤i≤N) is X_i.
Bitaro will visit all the sightseeing spots in JOI City. Since “greedy” is the slogan of his life, he will repeat the following procedures until he visits all the sightseeing spots.
However, thanks to long years of experience, Bitaro knows that if he moves by repeating the above procedures, the total traveling distance may be longer than he expected. Since the total traveling distance varies according to the starting coordinate, he wants to know the total traveling distance until he visits all the sightseeing spots if he starts from each of Q candidates of starting coordinates S_1,S_2,…,S_Q.
To help Bitaro, write a program which calculates the total traveling distance if he starts from each of the candidates of starting coordinates, given information of JOI City and candidates of starting coordinates.
Read the following data from the standard input.
N
X_1 X_2 ⋯ X_N
Q
S_1
S_2
⋮
S_Q
Write Q lines to the standard output. The j-th line (1≤j≤Q) of output should contain the total traveling distance if Bitaro starts from the coordinate S_j.