n = gets.to_i
count = 0
negative = 0

for i in 0..n-1 do
  a = gets.to_i
  for j in 1..a/3 do
    if (a - j) % (2 * j + 1) == 0
      count = 1
      break
    end
  end
  if count == 0
    negative = negative + 1
  end
  count = 0
end

puts negative

