# 一体版 import numpy as np from numpy.fft import rfft,irfft def add(A,B): if len(A)>i)&1: out = convolve(out, coef[-2]) return np.hstack([np.zeros(nzero*k,dtype=int),out[::-1]]) def div(A, B): Q = [] for i in range(max(len(A)-len(B)+1, 0)): Q.append(A[i] /B[0]) for j in range(len(B)): A[i+j] -= Q[-1]*B[j] R = [] for i in range(len(A)): if A[i]: R = A[i:] break if not Q: Q = [0] if not R: R = [0] return Q,R N,X = map(int,input().split()) *A,=map(int,input().split()) B = np.zeros(10**5+5,dtype=int) for i in range(N): B[A[i]] += 1 C = convolve(B,B) print(C[X])