#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <iostream>
#include <climits>
#include <cfloat>


using namespace std;


double area(double a, double b, double c)
{
	double s = (a+b+c)/2;
	return sqrt(s*(s-a)*(s-b)*(s-c));
}
double distance(double x1, double y1, double x2, double y2)
{
	return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
bool isInTriangle(double x[3], double y[3], double xp, double yp)
{
	double edge[3];
	for (int i = 0; i < 3; ++i)
		edge[i] = distance(x[i], y[i], x[(i+1)%3], y[(i+1)%3]);
	double correctArea = area(edge[0], edge[1], edge[2]);
	double totalArea = 0;
	for (int i = 0; i < 3; ++i)
	{
		totalArea += area(distance(x[i], y[i], xp, yp)
			, distance(x[(i+1)%3], y[(i+1)%3], xp, yp), edge[i]);
	}
	return abs(correctArea - totalArea) < 0.0001;
}

int main()
{
	while (true)
	{
		int n;
		scanf("%d\n", &n);
		if (n == 0)
			break;

		double x[100];
		double y[100];
		for (int i = 0; i < n; ++i)
			scanf("%lf,%lf\n", x+i, y+i);

		int res = 0;
#define SUCC(w) ((w+1) % n)
		for (int i = 0; i < n; ++i)
		{
			double xp = x[i];
			double yp = y[i];
			bool isOutOfAnyTriangle = true;
			for (int a = SUCC(i); a != i; a = SUCC(a))
			{
				for (int b = SUCC(a); b != i; b = SUCC(b))
				{
					for (int c = SUCC(b); c != i; c = SUCC(c))
					{
						double xx[] = { x[a], x[b], x[c] };
						double yy[] = { y[a], y[b], y[c] };
						if (isInTriangle(xx, yy, xp, yp))
						{
							isOutOfAnyTriangle = false;
							goto End;
						}
					}
				}
			}
End:
			if (!isOutOfAnyTriangle)
				++res;
		}
		printf("%d\n", res);
	}

	return 0;
}