#include #include using namespace std; int main() { long n, x; cin >> n; cin >> x; vector a(n); for (long i = 0; i < n; i++){ cin >> a[i]; } long res = 0; for (long i = 0; i < n; i++){ for (long j = 0; j < n; j++){ if ((a[i] + a[j]) == x) res++; } } cout << res << "\n"; }