def getCross point, prepre, pre, current
  (point[pre][0] - point[prepre][0]) * (point[current][1] - point[prepre][1]) - (point[pre][1] - point[prepre][1]) * (point[current][0] - point[prepre][0])
end

#３点の作る折れ線の回転方向を判定する
def areLeft point, upper
  cross = getCross(point, upper[upper.size - 3], upper[upper.size - 2], upper[upper.size - 1])
  (cross >= 0)? true : false 
end

#凸包生成
def convexHull point
  return point if point.size == 3

  #上側は左端から
  upper = [0, 1]
  2.upto(point.size - 1) do |i|
    upper << i
    while upper.size >= 3 && areLeft(point, upper)
      upper.delete_at(upper.size - 2)
    end
  end

  #下側は右端から
  lower = [point.size - 1, point.size - 2]
  (point.size - 3).downto(0) do |i|
    lower << i
    while lower.size >= 3 && areLeft(point, lower)
      lower.delete_at(lower.size - 2)
    end
  end

  #左端と右端の重複を排除
  upper.pop
  lower.pop

  hull = upper + lower
end

until (n = $stdin.gets.to_i) == 0
  point = Array.new
  n.times do
    point << $stdin.gets.chomp.split(",").map(&:to_f)
  end
  #事前準備としてx軸について座標をソート。x同軸についてはy軸ソート
  point.sort!{|a,b| 
    if a[0] == b[0]
      a[1] <=> b[1]
    else
      a[0] <=> b[0]
  end}

  p point.size - convexHull(point).size
end