### subroutines

def o_prod(v0, v1)
  v0[0] * v1[1] - v0[1] * v1[0]
end

def cross_lines?(u0, u1, v0, v1)
  # x = dux * t + u0x = dvx * s + v0x
  # y = duy * t + u0y = dvy * s + v0y
  # dux * t - dvx * s = v0x - u0x
  # duy * t - dvy * s = v0y - u0y
  # |dux -dvx| |t| = |v0x-u0x|
  # |duy -dvy| |s|   |v0y-u0y|
  # det == dux*(-dvy)-(-dvx)*duy = -dux*dvy+dvx*duy
  # |t| = 1/det * |-dvy dvx| |v0x-u0x|
  # |s|           |-duy dux| |v0y-u0y|

  dux = u1[0] - u0[0]
  duy = u1[1] - u0[1]
  dvx = v1[0] - v0[0]
  dvy = v1[1] - v0[1]

  det = -dux * dvy + dvx * duy
  return false if det == 0

  vux = v0[0] - u0[0]
  vuy = v0[1] - u0[1]

  t = (-dvy * vux + dvx * vuy).to_f / det
  s = (-duy * vux + dux * vuy).to_f / det

  #p ["cl?", u0, u1, v0, v1, t, s]
  t > 0.0 && t < 1.0 && s > 0.0 && s < 1.0
end

def min_vert(k, bits)
  return (bits == $allbits ? 0 : $n) if k >= $n
  return $mvcache[k][bits] if ! $mvcache[k][bits].nil?
  return ($mvcache[k][bits] = 0) if bits == $allbits

  v0 = min_vert(k + 1, bits)
  v1 = 1 + min_vert(k + 1, bits | $reaches[k])

  $mvcache[k][bits] = ((v0 < v1) ? v0 : v1)
end

### main

while true
  $n = gets.strip.to_i
  break if $n == 0

  pts = $n.times.map{gets.strip.split(' ').map{|s| s.to_i}}
  #p pts

  convex = []
  for i0 in (0...$n)
    i1 = (i0 + 1) % $n
    i2 = (i1 + 1) % $n
    v0 = [pts[i1][0] - pts[i0][0], pts[i1][1] - pts[i0][1]]
    v1 = [pts[i2][0] - pts[i1][0], pts[i2][1] - pts[i1][1]]
    convex << (o_prod(v0, v1) >= 0)
  end

  $reaches = []

  for i in (0...$n)
    ## 0
    ri = (1 << i)

    ## 1, n-1
    ri |= (1 << ((i + 1) % $n))
    ri |= (1 << ((i + ($n - 1)) % $n))

    ## 2, n-2
    j0 = (i + 2) % $n
    ri |= (1 << j0) if convex[i]
    j1 = (i + ($n - 2)) % $n
    ri |= (1 << j1) if convex[j1]

    ## 3-(n-3)
    for dj in (3..($n - 3))
      j = (i + dj) % $n

      ok = true
      for k in (0...$n)
        if cross_lines?(pts[i], pts[j], pts[k], pts[(k + 1) % $n])
          ok = false
          break
        end
      end

      if ok
        ri |= (1 << j)
      end
    end

    $reaches << ri
  end
  #p $reaches.map{|r| sprintf("%0*b", $n, r)}

  $mvcache = $n.times.map{[]}
  $allbits = (1 << $n) - 1

  mv = min_vert(0, 0)
  puts mv
end