#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX / 2;
class Point {
 public:
  int y, x;
  Point() { y = x = 0; }
  Point(int y0, int x0) {
    y = y0;
    x = x0;
  }
  Point operator+(const Point& p) const { return Point(y + p.y, x + p.x); }
  Point operator-(const Point& p) const { return Point(y - p.y, x - p.x); }
  Point operator*(int a) const { return Point(y * a, x * a); }
  Point operator/(int a) const { return Point(y / a, x / a); }
  int length2() const { return y * y + x * x; }
  int dist2(const Point& p) const {
    return (y - p.y) * (y - p.y) + (x - p.x) * (x - p.x);
  }
  int dot(const Point& p) const { return y * p.y + x * p.x; }
  int cross(const Point& p) const { return x * p.y - y * p.x; }
};
bool segmentsCollide(const Point& a1, const Point& a2, const Point& b1,
                     const Point& b2) {
  return ((a2 - a1).cross(b1 - a1) * (long long)(a2 - a1).cross(b2 - a1) < 0) &&
         ((b2 - b1).cross(a1 - b1) * (long long)(b2 - b1).cross(a2 - b1) < 0);
}
bool convexContain(const vector<Point>& cp, const Point& p) {
  int n = cp.size();
  double theta = 0.0;
  for (int i = 0; i < n; ++i) {
    if ((cp[i] - p).cross(cp[(i + 1) % n] - p) == 0) return true;
    theta += atan2((double)cp[i].y - p.y, cp[i].x - p.x);
  }
  return abs(theta) > 1;
}
int main() {
  for (;;) {
    int n;
    cin >> n;
    if (n == 0) return 0;
    vector<Point> p(n);
    for (int i = 0; i < n; ++i) {
      cin >> p[i].x >> p[i].y;
      p[i] = p[i] * 2;
    }
    vector<int> dp(1 << n, INF);
    dp[0] = 0;
    for (int i = 0; i < (1 << n); ++i) {
      for (int a = 0; a < n; ++a) {
        bitset<16> bs(i);
        bs[a] = true;
        for (int b = 0; b < n; ++b) {
          if (a == b) continue;
          bool ok = true;
          for (int j = 0; j < n; ++j) {
            if (segmentsCollide(p[a], p[b], p[j], p[(j + 1) % n])) ok = false;
          }
          if (!convexContain(p, (p[a] + p[b]) / 2)) ok = false;
          if (ok) bs[b] = true;
        }
        dp[bs.to_ulong()] = min(dp[bs.to_ulong()], dp[i] + 1);
      }
    }
    cout << dp[(1 << n) - 1] << endl;
  }
}
