실버4 문제
n = int(input())
m = int(input())
arr = list(map(int, input().split()))
cnt = 0
while (len(arr) >= 2):
num = m - arr[0]
if ( num in arr[1:] ):
cnt += 1
arr.remove(arr[0])
arr.remove(num)
else:
arr.remove(arr[0])
print(cnt)
n = int(input())
m = int(input())
arr = list(map(int, input().split()))
arr.sort()
cnt = 0
i, j = 0, n-1
while i < j:
if arr[i] + arr[j] == m:
cnt += 1
i += 1
j -= 1
elif nums[i] + nums[j] < m:
i += 1
else:
j -= 1
print(cnt)