#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;

int main() {
	int n,i,k,p,cn;
	double x[100],y[100],dx,dy,sx,sy,a,b,c,d,e;
	while(cin >> n) {
     if (n==0) break;
	 for (i=0;i<n;i++) scanf("%lf,%lf",&x[i],&y[i]);
     sy=-1000;
	 for (i=0;i<n;i++) if (y[i]>sy) { sy=y[i]; k=i;}
	 dx=x[k]-10; dy=y[k]; sx=x[k];  sy=y[k]; cn=0;
	 do {
        e=2; 
		for (i=0;i<n;i++) {
			if (!((x[i]==dx && y[i]==dy) || (x[i]==sx && y[i]==sy))) {
            c=sqrt((sx-dx)*(sx-dx)+(sy-dy)*(sy-dy));
			b=sqrt((x[i]-sx)*(x[i]-sx)+(y[i]-sy)*(y[i]-sy));
			a=sqrt((x[i]-dx)*(x[i]-dx)+(y[i]-dy)*(y[i]-dy));
            d=(b*b+c*c-a*a)/(2*b*c);
			if (d<e) { e=d; p=i; }
			}
		}
		dx=sx; dy=sy; sx=x[p]; sy=y[p];
        cn++;
	 } while(!(sx==x[k] && sy==y[k]));
	 cout << n-cn << endl;
	}
 return 0;
}