## subroutines

def is_invalid?(a)
  x = 1
  while 2 * (x * x + x) <= a
    if (a - x) % (2 * x + 1) == 0
      return false
    end
    x += 1
  end
  true
end

### main

n = gets.strip.to_i
count = 0

n.times do
  a = gets.strip.to_i
  count +=1 if is_invalid?(a)
end

puts count