#include <bits/stdc++.h>
using namespace std;
const double EPS = (1e-10);
const double INF = (1e15);
namespace std {
bool operator<(const complex<double>& a, const complex<double>& b) {
  return a.real() != b.real() ? a.real() < b.real() : a.imag() < b.imag();
}
bool operator==(const complex<double>& a, const complex<double>& b) {
  return abs(a - b) < EPS;
}
}  // namespace std
double dot(complex<double> a, complex<double> b) {
  return a.real() * b.real() + a.imag() * b.imag();
}
double cross(complex<double> a, complex<double> b) {
  return a.real() * b.imag() - a.imag() * b.real();
}
int ccw(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  if (cross(b, c) > EPS) return 1;
  if (cross(b, c) < -EPS) return -1;
  if (dot(b, c) < -EPS) return 2;
  if (norm(c) - norm(b) > EPS) return -2;
  return 0;
}
bool is_cross(pair<complex<double>, complex<double> > a,
              pair<complex<double>, complex<double> > b) {
  if (ccw(a.first, a.second, b.first) * ccw(a.first, a.second, b.second) < 0 &&
      ccw(b.first, b.second, a.first) * ccw(b.first, b.second, a.second) < 0)
    return true;
  return false;
}
int in_poly(complex<double> a, vector<complex<double> > p) {
  int n = p.size(), c = 0;
  for (int i = 0; i < n; ++i) {
    complex<double> s = p[i] - a, t = p[(i + 1) % n] - a;
    if (!ccw(s, t, complex<double>(0, 0))) return 1;
    if (s.imag() > t.imag() + EPS) swap(s, t);
    if ((s.imag() * t.imag() < 0 ||
         (s.imag() * t.imag() < EPS && t.imag() > EPS)) &&
        cross(s, t) < EPS)
      ++c;
  }
  if (c % 2) return 2;
  return 0;
}
using namespace std;
int main() {
  int n;
  while (cin >> n, n) {
    vector<complex<double> > V;
    for (int i = 0; i < n; ++i) {
      double x, y;
      cin >> x >> y;
      V.push_back(complex<double>(x, y));
    }
    vector<vector<bool> > valid(n, vector<bool>(n, false));
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < i; ++j) {
        pair<complex<double>, complex<double> > l =
            pair<complex<double>, complex<double> >(V[i], V[j]);
        bool f = false;
        for (int k = 0; k < n; ++k) {
          if (k == i || (k + 1) % n == i || k == j || (k + 1) % n == j)
            continue;
          f |= is_cross(
              l, pair<complex<double>, complex<double> >(V[k], V[(k + 1) % n]));
          if (f) {
            break;
          }
        }
        if (f) continue;
        for (int k = 0; k < n; ++k) {
          complex<double> m = V[i] + (V[j] - V[i]) / (double)(n * k);
          if (!in_poly(m, V)) f = true;
        }
        if (f) continue;
        valid[i][j] = true;
        valid[j][i] = true;
      }
    }
    for (int i = 0; i < n; ++i) {
      valid[i][i] = true;
      valid[i][(i + 1) % n] = true;
      valid[(i + 1) % n][i] = true;
    }
    int ans = n / 3;
    for (int i = 1; i < (1 << n); ++i) {
      vector<bool> ok(n, false);
      int c = 0;
      for (int j = 0; j < n; ++j) {
        if (!((i >> j) & 1)) continue;
        ++c;
        for (int k = 0; k < n; ++k) {
          if (valid[j][k] && valid[j][(k + 1) % n]) ok[k] = true;
        }
      }
      bool f = true;
      for (int j = 0; j < n; ++j) f &= ok[j];
      if (f) ans = min(ans, c);
    }
    cout << ans << endl;
  }
  return 0;
}
