module Vector =
  struct
    type t = { x: float; y: float }
    let eps = 1e-10
    let init x y = {x = x; y = y}
    let add v1 v2 = {x = v1.x +. v2.x; y = v1.y +. v2.y}
    let sub v1 v2 = {x = v1.x -. v2.x; y = v1.y -. v2.y}
    let mul v a = {x = v.x *. a; y = v.y *. a}
    let div v a = {x = v.x /. a; y = v.y /. a}
    let norm v = v.x *. v.x +. v.y *. v.y
    let abs v = sqrt (norm v)
    let dot v1 v2 = v1.x *. v2.x +. v1.y *. v2.y
    let cross v1 v2 = v1.x *. v2.y -. v1.y *. v2.x
    type ccw_t = Ccw | Cw | Ob | Of | Os
    let ccw p0 p1 p2 =
      let v0 = sub p1 p0
      and v1 = sub p2 p0 in
      if cross v0 v1 > eps then Ccw
      else if cross v0 v1 < (-1.0) *. eps then Cw
      else if dot v0 v1 < (-1.0) *. eps then Ob
      else if (norm v0) < (norm v1) then Of
      else Os
  end

let id x = x

let rec read n = if n <= 0 then [] else let z = Scanf.scanf "%f,%f\n" (fun x y -> Vector.init x y) in z :: read (n - 1)

let rec convex clst rlst = 
  match (clst, rlst) with
  | ([], _) -> rlst
  | (c :: crest, []) -> convex crest [c]
  | (c :: crest, [r]) -> convex crest [c;r]
  | (c :: crest, r1 :: r2 :: rrest) -> if Vector.ccw r2 r1 c = Vector.Cw then convex crest (c :: rlst)
                                       else convex clst (r2 :: rrest)

let solve lst =
  let slst = List.sort compare lst in
  let rslst = List.rev slst in
  let ul = convex slst [] in
  let ll = convex rslst [] in
  (List.length lst) - (List.length ul) - (List.length ll) + 2

let _ = 
  let rec loop () = 
    let n = Scanf.scanf "%d\n" id in
    if n = 0 then ()
    else
      begin
        let xy = read n in
        Printf.printf "%d\n" @@ solve xy;
        loop ()
      end
  in loop ()