The measure of a man lies not in what he says but what he does.
Superman needs to solve a problem in order to decipher Bizarro's weird language and save the day. Help him solve the problem.
Given an array A of n integers, how many triplets (a,b,c) exist that satisfy the formula a+b+c=k and a,b,c∈A.
INPUT
First line of input contains n, the number of elements in the array and k, the value k in the formula
The next line of input contains n integers, a1,a2,...an, representing the array of numbers.
OUTPUT
Print the answer to the problem. It is guaranteed that the answer will fit inside a 64 bit integer.
CONSTRAINTS
3≤n≤1000
1≤ai≤106
1≤k≤106
All the numbers in array A are distinct.
Possible values of a, b, c are
(1,1,3),(1,2,2),(1,3,1),(2,1,2),(2,2,1),(3,1,1)