Chuchu has got an array of size n, now he wants to count number of unordered triplets present in the array such that absolute difference between any two elements of a triplet should be at least d. Formally, if (a,b,c) is a triplet then |a−b|≥d,|b−c|≥d and |c−a|≥d.
Help Chuchu in counting such triplets.
Input:
Output:
For each query output the number of triplets satisfying above mentioned condition in a newline.
Constraints:
For first test case [2,4,6], triplet (2,4,6) follows the given criteria, so answer is 1.