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