#include #define File(a) freopen(a ".in", "r", stdin), freopen(a ".out", "w", stdout) using uint = unsigned; using ll = long long; using ull = unsigned long long; using pii = std::pair; const int N = 12; class Point { public: using Vector = Point; int x, y; Point(int x = 0, int y = 0) : x(x), y(y) {} friend Vector operator-(const Point &a, const Point &b) { return Vector(a.x - b.x, a.y - b.y); } } p[N]; using Vector = Point; int cross(const Vector &a, const Vector &b); int sgn(int x); void upd(int &a, const int &b) { a = std::min(a, b); } int dp[1 << N][N][N]; int n; int main() { scanf("%d", &n); for (int i = 0; i < n; ++i) scanf("%d %d", &p[i].x, &p[i].y); memset(dp, 0x3f, sizeof(dp)); for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { if (i == j) continue; dp[(1 << i) | (1 << j)][i][j] = 1; } } for (int s = 0; s < 1 << n; ++s) { for (int i = 0; i < n; ++i) { if (~s >> i & 1) continue; for (int j = 0; j < n; ++j) { if (~s >> j & 1) continue; int now = dp[s][i][j]; for (int k = 0; k < n; ++k) { if (s >> k & 1) continue; if (sgn(cross(p[j] - p[i], p[k] - p[j])) == 0) upd(dp[s | (1 << k)][j][k], now); else upd(dp[s | (1 << k)][j][k], now + 1); for (int l = 0; l < n; ++l) { if (s >> l & 1) continue; if (l == k) continue; int s1 = sgn(cross(p[j] - p[i], p[k] - p[j])); int s2 = sgn(cross(p[k] - p[j], p[l] - p[k])); int s3 = sgn(cross(p[j] - p[i], p[l] - p[k])); if (s1 == s2 && s2 == s3) upd(dp[s | (1 << k) | (1 << l)][k][l], now + 1); } } } } } int ans = n; for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { if (i == j) continue; ans = std::min(ans, dp[(1 << n) - 1][i][j]); } } printf("%d\n", ans); return 0; } int cross(const Vector &a, const Vector &b) { return a.x * b.y - a.y * b.x; } int sgn(int x) { return (x == 0) ? 0 : ((x > 0) ? 1 : -1); }