from __future__ import annotations import sys from itertools import permutations input = sys.stdin.readline class Vector2: def __init__(self, x, y): self.x = x self.y = y def __str__(self): return str((self.x, self.y)) __repr__ = __str__ def __eq__(self, other): return (self.x == other.x and self.y == other.y) def __hash__(self): return hash((self.x, self.y)) def __add__(self, other): return Vector2(self.x + other.x, self.y + other.y) def __sub__(self, other): return Vector2(self.x - other.x, self.y - other.y) def __mul__(self, other): return self.x * other.y - self.y * other.x def normalize(self) -> Vector2: assert(self.x != 0 or self.y != 0) norm = self.x ** 2 + self.y ** 2 self.x *= abs(self.x) / norm self.y *= abs(self.y) / norm return self def sgn(x: int) -> int: if(x > 0): return 1 if(x < 0): return -1 return 0 def same_inclination(v1: Vector2, v2: Vector2) -> bool: return (v1 * v2 == 0 and (v1.x * v2.x > 0 or v1.y * v2.y > 0)) """ Main Code """ N = int(input()) P = [Vector2(*map(int, input().split())) for _ in [0] * N] if(N == 1): print(1) exit(0) perm = [*permutations([*range(N)], 2)] vec_lis = [[None]*N for _ in [0]*N] for i, j in perm: vec_lis[i][j] = P[j] - P[i] ans = N dp = [[[N]*N for _ in [0]*N] for _ in [0]*(1 << N)] for i, j in perm: dp[(1 << i) | (1 << j)][i][j] = 1 goal = (1 << N) - 1 for b_now in range(3, goal): for v_prev, v_now in perm: if(dp[b_now][v_prev][v_now] == N or not((b_now >> v_prev) & 1) or not((b_now >> v_now) & 1)): continue c_next = c_now = dp[b_now][v_prev][v_now] v1 = vec_lis[v_prev][v_now] for v_next1, v_next2 in perm: if((((b_now >> v_next1) & 1) and v_now != v_next1) or ((b_now >> v_next2) & 1)): continue b_next = b_now | (1 << v_next1) | (1 << v_next2) v2, v3 = vec_lis[v_now][v_next1], vec_lis[v_next1][v_next2] if(v_now == v_next1): c_next = c_now + 1 - same_inclination(v1, v3) else: d = same_inclination(v1, v2) + same_inclination(v2, v3) if(d == 0): d = (sgn(v1 * v2) == sgn(v2 * v3) == sgn(v1 * v3)) c_next = c_now + 2 - d # print(b_now, b_next, v_prev, v_now, v_next1, v_next2, c_now, c_next) if(dp[b_next][v_next1][v_next2] <= c_next): continue dp[b_next][v_next1][v_next2] = c_next ans = min(min(lis) for lis in dp[goal]) print(ans)