#include int main(void) { long n,x,a[100000],t[100001]={0},s=0,i; scanf("%ld%ld",&n,&x); for(i=0;i=0&&100000>=x-a[i])s+=t[x-a[i]]; printf("%ld",s); return 0; }