# -*- coding: utf-8 -*-
list = {}

def calc(x,y)
  return 2*x*y + x + y
end
# ?????????????????????x??¨y??????????????????
def survey_x_y(cur_x_y, list)
  cur_x_y.times do |index|
    if index == 0
      next
    end
    x = index
    y = cur_x_y - index
    if x > y
      break
    end
    # ??????????????????
    list[calc(x,y)] = true
  end
end
def survey(area, list,surveyed_x_y)
  loop do
    if calc(1,surveyed_x_y) > area
      break
    else
      surveyed_x_y += 1
      survey_x_y(surveyed_x_y, list)
    end
  end
  if list[area] == true
    return true
  else
    return false
  end
end

surveyed_x_y = 2
survey_x_y(surveyed_x_y,list)

line = gets
count = line.to_i
cur_x_y = 2
bad_num = 0
count.times do
  line = gets
  area = line.to_i
  if survey(area,list,surveyed_x_y) == false
    bad_num += 1
  end
end
puts bad_num