#include<cstdio>
#include<functional>
#include<algorithm>
#include<cmath>
using namespace std;
int main(void)
{
	int i,n,cnt,mi,ii;
	double x[100],y[100],x0,y0,x1,y1,mx,x2,y2,kos,mkos;
	while(1)	{
		scanf("%d",&n);
		if(n==0)	break;
		for(i=0;i<n;i++)	{
			scanf("%lf,%lf",&x[i],&y[i]);
		}
		mx=999.0;
		for(i=0;i<n;i++)	{
			if(mx>x[i])	{
				mx=x[i];	mi=i;
			}
		}
		cnt=1;
		x0=x[mi];	y0=y[mi]+1.0;	x1=x[mi];	y1=y[mi];	ii=mi;
		while(1)	{
//			printf("x1=%lf y1=%lf\n",x1,y1);
			mkos=2.0;
			for(i=0;i<n;i++)	{
				if(i!=ii)	{
					x2=x[i];	y2=y[i];
					kos=((double)(x0-x1)*(x2-x1)+(double)(y0-y1)*(y2-y1))/
					(sqrt((double)(x0-x1)*(x0-x1)+(double)(y0-y1)*(y0-y1))*
					 sqrt((double)(x2-x1)*(x2-x1)+(double)(y2-y1)*(y2-y1)));
					if(mkos>kos)	{
						mkos=kos;
						ii=i;
					}
				}
			}
			if(mi==ii)	break;
			x0=x1;	y0=y1;	x1=x[ii];	y1=y[ii];
			cnt++;
		}	
		printf("%d\n",n-cnt);
	}
	return 0;
}
