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