This a magical country where the wizard use magic to help people. But the country's roads are so narrow that they are almost as wide as one car, so two cars can't drive side by side. Wizards use magic on ths road so that when two cars overlapped, they would penetrate each other. In addition, the speed of vehicles on the road is 1m/s and the direction can only be 1 and -1.

Unfortunately, there are some people in the country who call themselves black magicians. The black magicians intend to do some damage. They cast a spell in a castle, making the magic in the middle of the castle ineffective.That is, if two cars overlap in the middle of the castle, the two cars will collide.Not only that, black magicians can also cause all vehicles to be able to simultaneously enchant in a certain direction, with the maximum enchant speed being wmax.
Now, the road is regarded as a one-dimensional coordinate axis, with the positive center of castle as the origin of the one-dimensional coordinate axis.There are n vehicles on the coordinate axis, and the coordinate of the ith vehicle on the coordinate axis is Xi. The length of each vehicle is l, that is to say, the coordinate of the ith vehicle is (Xi, Xi + L), and it is ensured that no two vehicles have the same coverage area at the beginning.
Now the black magicians want to know how many pairs of cars may collide at the speed of W (- Wmax < = w < = Wmax).
5 1 2 -2 1 2 1 3 -1 5 -1 7 -1
4