#include <bits/stdc++.h>
const double EPS = 1e-5;
struct Point {
  double x, y;
  Point(const double d = 0.0) : x(d), y(d) {}
  Point(const double x, const double y) : x(x), y(y) {}
};
struct Segment {
  Point initial, terminal;
  Segment(const Point& initial = 0, const Point& terminal = 0)
      : initial(initial), terminal(terminal) {}
};
struct Line {
  Point initial, terminal;
  Line(const Point& initial = 0, const Point& terminal = 0)
      : initial(initial), terminal(terminal) {}
  Line(const Segment& s) : initial(s.initial), terminal(s.terminal) {}
};
bool operator==(const Point& lhs, const Point& rhs) {
  return lhs.x == rhs.x && lhs.y == rhs.y;
}
bool operator<(const Point& lhs, const Point& rhs) {
  return lhs.x != rhs.x ? lhs.x < rhs.x : lhs.y < rhs.y;
}
bool operator>(const Point& lhs, const Point& rhs) {
  return lhs.x != rhs.x ? lhs.x > rhs.x : lhs.y > rhs.y;
}
bool operator!=(const Point& lhs, const Point& rhs) { return !(lhs == rhs); }
bool operator<=(const Point& lhs, const Point& rhs) { return !(lhs > rhs); }
bool operator>=(const Point& lhs, const Point& rhs) { return !(lhs < rhs); }
const Point operator+(const Point& lhs, const Point& rhs) {
  return Point(lhs.x + rhs.x, lhs.y + rhs.y);
}
const Point operator-(const Point& lhs, const Point& rhs) {
  return Point(lhs.x - rhs.x, lhs.y - rhs.y);
}
const Point operator*(const Point& lhs, const Point& rhs) {
  return Point(lhs.x * rhs.x, lhs.y * rhs.y);
}
const Point operator/(const Point& lhs, const Point& rhs) {
  return Point(lhs.x / rhs.x, lhs.y / rhs.y);
}
const Point operator-(const Point& p) { return Point(-p.x, -p.y); }
double abs(const Point& p) { return std::hypot(p.x, p.y); }
double norm(const Point& p) { return p.x * p.x + p.y * p.y; }
double dot(const Point& a, const Point& b) { return a.x * b.x + a.y * b.y; }
double cross(const Point& a, const Point& b) { return a.x * b.y - a.y * b.x; }
bool parallel(const Line& l1, const Line& l2) {
  return std::abs(cross(l2.terminal - l2.initial, l1.terminal - l1.initial)) <=
         EPS;
}
bool orthogonal(const Line& l1, const Line& l2) {
  return std::abs(dot(l2.terminal - l2.initial, l1.terminal - l1.initial)) <=
         EPS;
}
enum POSITION {
  ONLINE_FRONT = -2,
  CLOCKWISE,
  ON_SEGMENT,
  COUNTER_CLOCKWISE,
  ONLINE_BACK
};
POSITION ccw(const Point& a, const Point& b, const Point& p) {
  Point v1 = b - a;
  Point v2 = p - a;
  if (cross(v1, v2) > EPS) return COUNTER_CLOCKWISE;
  if (cross(v1, v2) < -EPS) return CLOCKWISE;
  if (dot(v1, v2) < -EPS) return ONLINE_BACK;
  if (norm(v2) - norm(v1) > EPS) return ONLINE_FRONT;
  return ON_SEGMENT;
}
bool intersect(const Point& p1, const Point& p2) {
  return p1.x == p2.x && p1.y == p2.y;
}
bool intersect(const Point& p, const Segment& s) {
  return abs(p - s.initial) + abs(p - s.terminal) -
             abs(s.initial - s.terminal) <=
         EPS;
}
bool intersect(const Segment& s, const Point& p) { return intersect(p, s); }
bool intersect(const Point& p, const Line& l) {
  return !parallel(l.terminal - p, l.initial - p);
}
bool intersect(const Line& l, const Point& p) { return intersect(p, l); }
bool intersect(const Segment& s1, const Segment& s2) {
  return ccw(s1.initial, s1.terminal, s2.initial) *
                 ccw(s1.initial, s1.terminal, s2.terminal) <=
             0 &&
         ccw(s2.initial, s2.terminal, s1.initial) *
                 ccw(s2.initial, s2.terminal, s1.terminal) <=
             0;
}
bool intersect(const Segment& s, const Line& l) {
  auto v1 = l.terminal - l.initial;
  auto v2 = s.initial - l.initial;
  auto v3 = s.terminal - l.initial;
  return cross(v1, v2) * cross(v1, v3) <= EPS;
}
bool intersect(const Line& l, const Segment& s) { return intersect(s, l); }
bool intersect(const Line& l1, const Line& l2) {
  return !parallel(l1, l2) || parallel(l1, Line(l1.initial, l2.initial));
}
Point projection(const Point& p, const Line& l) {
  auto v = l.initial - l.terminal;
  return l.initial + dot(p - l.initial, v) / norm(v) * v;
}
Point projection(const Line& l, const Point& p) { return projection(p, l); }
Point reflection(const Point& p, const Line& l) {
  return p + 2 * (projection(p, l) - p);
}
Point reflection(const Line& l, const Point& p) { return reflection(p, l); }
double distance(const Point& p1, const Point& p2) {
  auto p = p1 - p2;
  return hypot(p.x, p.y);
}
double distance(const Point& p, const Segment& s) {
  auto r = projection(s, p);
  return intersect(r, s)
             ? distance(p, r)
             : std::min(distance(p, s.initial), distance(p, s.terminal));
}
double distance(const Segment& s, const Point& p) { return distance(p, s); }
double distance(const Point& p, const Line& l) {
  return distance(p, projection(p, l));
}
double distance(const Line& l, const Point& p) { return distance(p, l); }
double distance(const Segment& s1, const Segment& s2) {
  return intersect(s1, s2)
             ? 0.0
             : std::min({distance(s1, s2.initial), distance(s1, s2.terminal),
                         distance(s2, s1.initial), distance(s2, s1.terminal)});
}
double distance(const Segment& s, const Line& l) {
  return intersect(s, l)
             ? 0.0
             : std::min(distance(s.initial, l), distance(s.terminal, l));
}
double distance(const Line& l, const Segment& s) { return distance(s, l); }
double distance(const Line& l1, const Line& l2) {
  return intersect(l1, l2) ? 0.0 : distance(l1.initial, l2);
}
const Point crosspoint(const Line& l1, const Line& l2) {
  double A = cross(l1.terminal - l1.initial, l2.terminal - l2.initial);
  double B = cross(l1.terminal - l1.initial, l1.terminal - l2.initial);
  if (std::abs(A) < EPS && std::abs(B) < EPS) return l2.initial;
  assert(std::abs(A) > EPS);
  return l2.initial + B / A * (l2.terminal - l2.initial);
}
const Point crosspoint(const Segment& s, const Line& l) {
  Point cp = crosspoint(Line(s), l);
  assert(intersect(s, cp));
  return cp;
}
const Point crosspoint(const Line& l, const Segment& s) {
  return crosspoint(s, l);
}
const Point crosspoint(const Segment& s1, const Segment& s2) {
  Point cp = crosspoint(Line(s1), Line(s2));
  assert(intersect(s1, cp) && intersect(s2, cp));
  return cp;
}
using namespace std;
void print(const Point& p) { cout << "(" << p.x << "," << p.y << ")"; }
void print(const Line& l) {
  print(l.initial);
  cout << " - ";
  print(l.terminal);
}
class Polygon {
 public:
  void add(const Point& p) {
    if (!vertex_.empty()) {
      if (!edge_.empty()) edge_.pop_back();
      edge_.push_back(Segment(vertex_.back(), p));
      edge_.push_back(Segment(p, vertex_.front()));
    }
    vertex_.push_back(p);
  }
  int size() const { return vertex_.size(); }
  Point vertex(const int n) const { return vertex_.at(n); }
  Segment edge(const int n) const { return edge_.at(n); }
  const std::vector<Point>& vertex() const { return vertex_; }
  const std::vector<Segment>& edge() const { return edge_; }
  bool touch(const Point& p) const {
    return std::any_of(edge_.begin(), edge_.end(), [=](const Segment& s) {
      return ccw(s.initial, s.terminal, p) == ON_SEGMENT;
    });
  }
  bool include(const Point& p) const {
    bool in = false;
    for (const auto& e : edge()) {
      if (intersect(p, e)) return true;
      Point a = e.initial - p;
      Point b = e.terminal - p;
      if (a.y > b.y) std::swap(a, b);
      if (a.y <= EPS && 0.0 < b.y && cross(a, b) < EPS) in = !in;
    }
    return in;
  }
  void clear() {
    vertex_.clear();
    edge_.clear();
  };

 private:
  std::vector<Point> vertex_;
  std::vector<Segment> edge_;
};
using namespace std;
const int N = 16;
int n;
Polygon polygon;
vector<Segment> wall;
vector<Segment> edge;
vector<vector<int>> memo_inside;
vector<vector<int>> memo_visible;
bool inside(const int v, const int e) {
  if (memo_inside[v][e] != -1) return memo_inside[v][e];
  Point g = (polygon.vertex(v) + edge[e].initial + edge[e].terminal) / 3.0;
  return memo_inside[v][e] = polygon.include(g);
}
bool visible(const int v, const int e) {
  if (memo_visible[v][e] != -1) return memo_visible[v][e];
  Segment s(polygon.vertex(v), (edge[e].initial + edge[e].terminal) / 2.0);
  for (const auto& w : wall) {
    if (parallel(w, edge[e])) continue;
    if (intersect(s.initial, w.initial)) continue;
    if (intersect(s.initial, w.terminal)) continue;
    if (intersect(s, w)) return memo_visible[v][e] = 0;
  }
  return memo_visible[v][e] = 1;
}
int solve(const bitset<N>& use) {
  vector<bool> covered(edge.size(), false);
  for (int v = 0; v < n; ++v) {
    if (!use[v]) continue;
    for (int i = 0; i < edge.size(); ++i) {
      if (covered[i]) continue;
      if (!inside(v, i)) continue;
      if (visible(v, i)) covered[i] = true;
    }
  }
  return all_of(covered.begin(), covered.end(), [](bool b) { return b; })
             ? use.count()
             : N + 1;
}
int combination(bitset<N>& use, const int depth = 0) {
  return depth == n ? solve(use)
                    : min(combination(use.set(depth), depth + 1),
                          combination(use.reset(depth), depth + 1));
}
int main() {
  while (cin >> n, n) {
    polygon.clear();
    for (int i = 0; i < n; ++i) {
      double x, y;
      cin >> x >> y;
      polygon.add(Point(x, y));
    }
    wall.clear();
    vector<vector<Point>> break_point(n);
    for (int i = 0; i < n; ++i) {
      wall.emplace_back(polygon.vertex(i), polygon.vertex((i + 1) % n));
      break_point[i].push_back(polygon.vertex(i));
      break_point[i].push_back(polygon.vertex((i + 1) % n));
    }
    for (int i = 0; i < n; ++i)
      for (int j = i + 1; j < n; ++j)
        for (int k = 0; k < n; ++k) {
          Line l(polygon.vertex(i), polygon.vertex(j));
          if (parallel(wall[k], l)) continue;
          if (!intersect(wall[k], l)) continue;
          break_point[k].emplace_back(crosspoint(wall[k], l));
        }
    for (auto& b : break_point) sort(b.begin(), b.end());
    edge.clear();
    for (const auto& bp : break_point)
      for (int j = 1; j < bp.size(); ++j) {
        if (bp[j - 1] != bp[j]) edge.emplace_back(bp[j - 1], bp[j]);
      }
    memo_inside = vector<vector<int>>(n, vector<int>(edge.size(), -1));
    memo_visible = vector<vector<int>>(n, vector<int>(edge.size(), -1));
    bitset<N> use;
    cout << combination(use) << endl;
  }
}
