loop do
  n = gets.to_i
  break if n==0
  a,b,c,*dots = n.times.map{|i| gets.split(",").map(&:to_f)}
  d = [a,b,c]
  cnt = 0
  dots.each do |v|
    d << v
    d.permutation(4) do |w1,w2,w3,w4|
      v0 = [w2[0]-w1[0], w2[1]-w1[0]]
      v1 = [w3[0]-w1[0], w3[1]-w1[0]]
      v2 = [w4[0]-w1[0], w4[1]-w1[0]]
      t = (v0[0]*v2[1]-v2[0]*v0[1])/(v1[0]*v2[1]-v2[0]*v1[1])
      u = (v0[0]*v1[1]-v1[0]*v0[1])/(v2[0]*v1[1]-v1[0]*v2[1])
      if t>0 && u>0 && t+u<1
        d.delete(w2)
        cnt += 1
        break
      end
    end
  end
  puts cnt
end