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