import sys from itertools import permutations from fractions import Fraction as frac input = sys.stdin.readline class Vector2: def __init__(self, x: frac, y: frac): self.x = x self.y = y def __eq__(self, other): return (self.x == other.x and self.y == other.y) def __sub__(self, other): return Vector2(other.x - self.x, other.y - self.y) def __mul__(self, other): return self.x * other.y - self.y * other.x def normalize_vector(v: Vector2) -> Vector2: assert(v.x != 0 or v.y != 0) norm = v.x ** 2 + v.y ** 2 return Vector2(v.x * abs(v.x) / norm, v.y * abs(v.y) / norm) def sgn(x: frac) -> int: if(x > 0): return 1 if(x < 0): return -1 return 0 """ Main Code """ N = int(input()) P = [Vector2(*map(frac, input().split())) for _ in [0] * N] if(N == 1): print(1) exit(0) vec_lis = [[None]*N for _ in [0]*N] for i in range(N - 1): for j in range(i + 1, N): vec_lis[i][j] = normalize_vector(P[j] - P[i]) vec_lis[j][i] = normalize_vector(P[i] - P[j]) ans = N num = [*range(N)] for tup in permutations(num): p = [P[k] for k in num] lis = [vec_lis[tup[0]][tup[1]]] flag = False for i in range(1, N - 1): v = vec_lis[tup[i]][tup[i + 1]] if(lis[-1] == v): continue if(lis[-1] * v == 0): flag = True break lis.append(v) if(flag): continue M = len(lis) if(M <= 2): ans = min(ans, M) continue dp = [[-1]*2 for _ in [0]*(M - 1)] dp[0][0] = 0 for j in range(1, M - 1): v1, v2, v3 = lis[j - 1: j + 2] if(sgn(v1 * v2) == sgn(v2 * v3) == sgn(v1 * v3)): dp[j][1] = dp[j - 1][0] + 1 dp[j][0] = max(dp[j - 1]) ans = min(ans, M - max(dp[M - 2])) print(ans)