EPS = 1e-10
def cross(p, q)
  x0 = p[2] - p[0]
  y0 = p[3] - p[1]
  x1 = q[2] - q[0]
  y1 = q[3] - q[1]
  x2 = q[0] - p[0]
  y2 = q[1] - p[1]
  r = (y1 * x2 - x1 * y2) / (x0 * y1 - x1 * y0)
  s = (y0 * x2 - x0 * y2) / (x0 * y1 - x1 * y0)
  if r > -EPS && r < 1.0 + EPS && s > -EPS && s < 1.0 + EPS && judge(x = p[0] + r * x0, y = p[1] + r * y0)
    $cp << [x, y]
    $ans += 1
  end
end
def judge(x, y)
  $cp.all?{ |p| Math.sqrt(p[0] * x + p[1] * y) >= EPS }
end
while n = gets.to_i
  break if n == 0
  ls = n.times.map{ gets.split.map(&:to_f) }
  $cp = []
  $ans = 2
  (1...n).each do |i|
    (0...i).each do |j|
      cross(ls[i], ls[j])
    end
    $ans += 1
  end
  p $ans
end