n = gets.to_i
count = 0

for i in 0..n-1 do
  a = gets.to_i
  x = 1
  e = true
  while 2 * x * (x + 1) <= a
    if (a - x) % (2 * x + 1) == 0
      e = false
      break
    end
    x = x + 1
  end
  x = 0
  if e == true then
    count = count + 1
  end
end

puts count

