import functools
import math

def compute_bary(P):
    N = len(P)
    X, Y, A = 0, 0, 0
    for i in range(N):
        aux = (P[i][0] * P[(i + 1) % N][1]) - (P[i][1] * P[(i + 1) % N][0])
        A += aux
        X += aux * (P[i][0] + P[(i + 1) % N][0])
        Y += aux * (P[i][1] + P[(i + 1) % N][1])
    return ((X, 3*A), (Y, 3*A))

def cw(a, bary, c):
    bminusax = bary[0][0] - (a[0]*bary[0][1])
    cminusby = (c[1]*bary[1][1]) - bary[1][0]
    bminusay = bary[1][0] - (a[1]*bary[1][1])
    cminusbx = (c[0]*bary[0][1]) - bary[0][0]
    return (bminusax * cminusby) - (bminusay * cminusbx)

N = int(input())

P = [list(map(int, input().split())) for _ in range(N)]

bary = compute_bary(P)


def angle(x, bary):
     ans = math.pi / 2
     if x[0] * bary[0][1] != bary[0][0]:
         ans = math.atan((x[1] - bary[1][0]/bary[1][1]) / (x[0] - bary[0][0]/bary[0][1]))
     if x[0] * bary[0][1] <= bary[0][0]:
         ans += math.pi
     if x[0] * bary[0][1] == bary[0][0] and x[1] * bary[1][1] > bary[1][0]:
         ans -= math.pi
     return ans


L = sorted(P, key = lambda x: angle(x, bary))

L = list(filter(lambda x : (x[0] * bary[0][1] != bary[0][0]) or (x[1] * bary[1][1] != bary[1][0]), L))

N = len(L)

LL = L + L


cpt1, cpt2, cpt3, ans = 1, 1, 1, 0
for i in range(N):
    cpt1 = max(cpt1, i + 1)
    while cw(LL[i], bary, LL[cpt1]) == 0:
        cpt1 += 1
    cpt2 = max(cpt1, cpt2)
    while cw(LL[i], bary, LL[cpt2]) < 0:
        cpt2 += 1
    cpt3 = max(cpt2, cpt3)
    while cw(LL[i], bary, LL[cpt3]) == 0:
        cpt3 += 1
    opposite = cpt3 - cpt2
    after = N + i - cpt3
    ans += (after + opposite) * (after + opposite - 1) // 2
    ans -= (opposite - 1) * opposite // 2
print(N*(N-1)*(N-2)//6 - ans)
