Under your help, the sheik of the forest found that the demons weren't among the men. They must have escaped. After reading ancient books, the sheik found that exactly m cd (candela, which is the unit of strength of light) units of light exposed by the join of two light swords can kill the demons. The men in the forest brought n light swords and put them in ascending order. Could you help sheik to find how many pairs are in the given n light swords with a combination of m cd.
(You can also choose a light sword twice if the condition is satisfied for the sheik can get another same one from the craftsman in the forest.)