Jeff's friends know full well that the boy likes to get sequences and arrays for his birthday. Thus, Jeff got sequence p1,p2,...,pn for his birthday.
Jeff hates inversions in sequences. An inversion in sequence a1,a2,...,an is a pair of indexes i,j (1≤i<j≤n), such that an inequality ai>aj holds.
Jeff can multiply some numbers of the sequence p by -1. At that, he wants the number of inversions in the sequence to be minimum. Help Jeff and find the minimum number of inversions he manages to get.
Output
In a single line print the answer to the problem − the minimum number of inversions Jeff can get.