def a(v1,v2):

	if v1[0] != v2[0]:

		return (v2[1]-v1[1])/(v2[0]-v1[0])

	else:

		return (v2[1]-v1[1])*(10**10)

		

def convex(v,n):

	k = 0

	d = []

	u = []

	for i in range(n):

		d.append(i)

		u.append(i)

		while len(d) > 2:

			if a(v[d[-3]],v[d[-2]]) < a(v[d[-2]],v[d[-1]]):

				del d[-2]

			else:

				break

		while len(u) > 2:

			if a(v[u[-3]],v[u[-2]]) > a(v[u[-2]],v[u[-1]]):

				del u[-2]

			else:

				break

	return n - len(set(d+u))

	

while 1:

	n = eval(input())

	if n == 0: break

	v = [list(map(float,input().split(","))) for i in range(n)]

	v = sorted(sorted(v, key = lambda x:x[1]))

	print(convex(v,n))
def a(v1,v2):

	if v1[0] != v2[0]:

		return (v2[1]-v1[1])/(v2[0]-v1[0])

	else:

		return (v2[1]-v1[1])*(10**10)

def dlt(p,v,sign):

	while len(p) > 2:

		if sign*(a(v[p[-3]],v[p[-2]]) - a(v[p[-2]],v[p[-1]])) < 0:

			del p[-2]

		else:

			break

	return p

def convex(v,n):

	d,u = [],[]

	for i in range(n):

		d = dlt(d+[i],v,1)

		u = dlt(u+[i],v,-1)

	return n - len(set(d+u))

while 1:

	n = eval(input())

	if n == 0: break

	v = [list(map(float,input().split(","))) for i in range(n)]

	v = sorted(sorted(v, key = lambda x:x[1]))

	print(convex(v,n))
def a(v1, v2):
    if v1[0] != v2[0]:
        return (v2[1] - v1[1]) / (v2[0] - v1[0])
    else:
        return (v2[1] - v1[1]) * (10**10)


def convex(v, n):
    k = 0
    d = []
    u = []
    for i in range(n):
        d.append(i)
        u.append(i)
        while len(d) > 2:
            if a(v[d[-3]], v[d[-2]]) < a(v[d[-2]], v[d[-1]]):
                del d[-2]
            else:
                break
        while len(u) > 2:
            if a(v[u[-3]], v[u[-2]]) > a(v[u[-2]], v[u[-1]]):
                del u[-2]
            else:
                break
    return n - len(set(d + u))


while 1:
    n = eval(input())
    if n == 0:
        break
    v = [list(map(float, input().split(","))) for i in range(n)]
    v = sorted(sorted(v, key=lambda x: x[1]))
    print(convex(v, n))

def a(v1, v2):
    if v1[0] != v2[0]:
        return (v2[1] - v1[1]) / (v2[0] - v1[0])
    else:
        return (v2[1] - v1[1]) * (10**10)


def dlt(p, v, sign):
    while len(p) > 2:
        if sign * (a(v[p[-3]], v[p[-2]]) - a(v[p[-2]], v[p[-1]])) < 0:
            del p[-2]
        else:
            break
    return p


def convex(v, n):
    d, u = [], []
    for i in range(n):
        d = dlt(d + [i], v, 1)
        u = dlt(u + [i], v, -1)
    return n - len(set(d + u))


while 1:
    n = eval(input())
    if n == 0:
        break
    v = [list(map(float, input().split(","))) for i in range(n)]
    v = sorted(sorted(v, key=lambda x: x[1]))
    print(convex(v, n))

+def dlt(p, v, sign): +    while len(p) > 2: +        if sign * (a(v[p[-3]], v[p[-2]]) - a(v[p[-2]], v[p[-1]])) < 0: +            del p[-2] +        else: +            break +    return p + + -    k = 0 -    d = [] -    u = [] +    d, u = [], [] -        d.append(i) -        u.append(i) -        while len(d) > 2: -            if a(v[d[-3]], v[d[-2]]) < a(v[d[-2]], v[d[-1]]): -                del d[-2] -            else: -                break -        while len(u) > 2: -            if a(v[u[-3]], v[u[-2]]) > a(v[u[-2]], v[u[-1]]): -                del u[-2] -            else: -                break +        d = dlt(d + [i], v, 1) +        u = dlt(u + [i], v, -1)