#include <bits/stdc++.h>
using namespace std;
struct L {
  complex<long double> a, b;
};
const long double EPS = 1e-8;
int sig(long double a, long double b = 0) {
  return a < b - EPS ? -1 : a > b + EPS ? 1 : 0;
}
bool near(complex<long double> a, complex<long double> b) {
  return !sig(norm(a - b));
}
long double dot(complex<long double> a, complex<long double> b) {
  return a.real() * b.real() + a.imag() * b.imag();
}
long double det(complex<long double> a, complex<long double> b) {
  return a.real() * b.imag() - a.imag() * b.real();
}
int sAP(complex<long double> a, complex<long double> b,
        complex<long double> c) {
  return sig(det(a, c)) - sig(det(b, c)) - sig(det(a, b));
}
bool iGS(vector<complex<long double> > pol, L s) {
  int n = pol.size();
  vector<int> sa(n + 1), sb(n + 1), sab(n + 1);
  pol.push_back(pol[0]);
  pol.push_back(pol[1]);
  for (int i = 0; i < int(n + 1); ++i) {
    sa[i] = sig(det(pol[i + 1] - pol[i], s.a - pol[i]));
    sb[i] = sig(det(pol[i + 1] - pol[i], s.b - pol[i]));
    sab[i] = sig(det(s.b - s.a, pol[i] - s.a));
  }
  for (int i = 0; i < int(n); ++i)
    if (sa[i] * sb[i] < 0 && sab[i] * sab[i + 1] < 0) return true;
  for (int i = 0; i < int(n); ++i) {
    if (sa[i] == 0 && sb[i] > 0 && sig(dot(s.a - pol[i], s.a - pol[i + 1])) < 0)
      return true;
    if (sb[i] == 0 && sa[i] > 0 && sig(dot(s.b - pol[i], s.b - pol[i + 1])) < 0)
      return true;
  }
  for (int i = 0; i < int(n); ++i)
    if (sab[i + 1] == 0 && sig(dot(pol[i + 1] - s.a, pol[i + 1] - s.b)) <= 0) {
      if (!near(pol[i + 1], s.a) &&
          sAP(pol[i + 2] - pol[i + 1], pol[i] - pol[i + 1], s.a - pol[i + 1]) >
              0)
        return true;
      if (!near(pol[i + 1], s.b) &&
          sAP(pol[i + 2] - pol[i + 1], pol[i] - pol[i + 1], s.b - pol[i + 1]) >
              0)
        return true;
    }
  return false;
}
int main() {
  while (true) {
    int n;
    cin >> n;
    if (n == 0) break;
    vector<complex<long double> > pol(n);
    for (int i = 0; i < int(n); ++i) {
      long double x, y;
      cin >> x >> y;
      pol[i] = complex<long double>(x, y);
    }
    int bit[n];
    for (int i = 0; i < int(n); ++i) bit[i] = 0;
    reverse(pol.begin(), pol.end());
    for (int i = 0; i < int(n); ++i)
      for (int j = 0; j < int(n); ++j)
        if (!iGS(pol, (L){pol[i], pol[j]})) bit[i] |= 1 << j;
    for (int i = 0; i < int(n); ++i)
      if (i > 0) {
        int comb = (1 << i) - 1;
        while (comb < (1 << n)) {
          int cover = 0;
          for (int j = 0; j < int(n); ++j)
            if (comb & 1 << j) cover |= bit[j];
          if (cover == (1 << n) - 1) {
            cout << i << endl;
            goto next;
          }
          int x = comb & -comb, y = comb + x;
          comb = ((comb & ~y) / x >> 1) | y;
        }
      }
  next:;
  }
}
