local mma = math.max local mfl, mce, mmi = math.floor, math.ceil, math.min local n = io.read("*n") local x, y = {}, {} for i = 1, n do x[i], y[i] = io.read("*n", "*n") end if n == 1 then print(0) os.exit() end local function lensq(i, j) return (1LL * x[i] - x[j]) * (1LL * x[i] - x[j]) + (1LL * y[i] - y[j]) * (1LL * y[i] - y[j]) end local e1, e2 = {}, {} local v = {} local alive = {} for i = 1, n do alive[i] = true end local c = 0 local idxes = {} for i = 1, n - 1 do for j = i + 1, n do c = c + 1 e1[c], e2[c] = i, j v[c] = lensq(i, j) idxes[c] = c end end table.sort(idxes, function(a, b) return v[a] < v[b] end) local ret = 0 for i = 1, c do local idx = idxes[i] local z1, z2 = e1[idx], e2[idx] if z1 == 1 then if alive[z2] then ret = ret + 1 alive[z2] = false end else if alive[z1] and alive[z2] then alive[z1], alive[z2] = false, false end end end print(ret)