import java.util.Scanner; public class No723 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String nx = sc.nextLine(); String[] nxArr = nx.split(" "); int N = Integer.parseInt(nxArr[0]); int X = Integer.parseInt(nxArr[1]); int a[]=new int[100000]; int t[] = new int[100001]; int i; for(i=0;i=0 && 100000 >= X-a[i]) { s +=t[X-a[i]]; } } System.out.println(s); } }