n = gets.to_i
a = Array.new(n)
count = 0
negative = 0

for i in 0..n-1 do
  a[i] = gets.to_i
  for j in 1..a[i] do
    for k in 1..a[i] do
      if 2 * j * k + j + k == a[i]
        count = count + 1
      end
    end
  end
  if count == 0
    negative = negative + 1
  end
  count = 0
end

puts negative

