def a(x1,y1,x2,y2,xp,yp)
    (x2-x1)*(yp-y1) - (y2-y1)*(xp-x1)
end
def in?(x1,y1,x2,y2,x3,y3,xp,yp)
    res = true
    res &= a(x1,y1,x2,y2,xp,yp) * a(x1,y1,x2,y2,x3,y3) > 0
    res &= a(x1,y1,x3,y3,xp,yp) * a(x1,y1,x3,y3,x2,y2) > 0
    res &= a(x3,y3,x2,y2,xp,yp) * a(x3,y3,x2,y2,x1,y1) > 0
    res
end

until (n = gets.chomp.to_i) == 0
    p = []
    n.times do
        p << gets.chomp.split(',').map(&:to_f)
    end

    minmax = p.minmax{|a,b| a[0] <=> b[0]}
    min = p.select{|x|x[0] == minmax[0][0]}
    max = p.select{|x|x[0] == minmax[1][0]}
    array = p
    min.each do |x| array -= x end
    max.each do |x| array -= x end
    min.each do |mn|
        max.each do |mx|
            array.size.times do |i|
                array.size.times do |j|
                    next if i==j
                    next if array[i]==nil || array[j]==nil
                    array[j] = nil if in?(mn[0],mn[1],mx[0],mx[1],array[i][0],array[i][1],array[j][0],array[j][1])
                end
            end
        end
    end
    puts array.select{|x| x==nil}.size
end