from collections import Counter def main(): N, X = map(int, input().split()) cnt = Counter(map(int, input().split())) ans = sum(c * cnt[X-a] for a, c in cnt.items() if a <= X) print(ans) main()