#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;


bool isInTriangle(double x[3], double y[3], double xp, double yp)
{
	double c[3];
	for (int i = 0; i < 3; ++i)
		c[i] = (x[(i+1)%3]-x[i]) * (yp - y[i]) - (y[(i+1)%3]-y[i]) * (xp - x[i]);

	return c[0] > 0 && c[1] > 0 && c[2] > 0
		|| c[0] < 0 && c[1] < 0 && c[2] < 0;
}

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 isOutOfAnyTriangles = 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))
						{
							isOutOfAnyTriangles = false;
							goto End;
						}
					}
				}
			}
End:
			if (!isOutOfAnyTriangles)
				++res;
		}
		printf("%d\n", res);
	}

	return 0;
}