#include<cstdio>
#include<vector>
#include<algorithm>

#define	EPS		1e-9
#define	pb(a)	push_back(a);

#define	ID_CCW	0
#define	ID_CW	1
#define	ID_GO	2
#define	ID_BACK	3

using namespace std;

class Point{
public:
	double x,y;
	Point(){}
	Point(double xx,double yy) : x(xx),y(yy){}
};

class Polygon : public vector<Point>{};

Point &operator -=(Point &a,const Point &b)
{
	a.x-=b.x;
	a.y-=b.y;
	return a;
}

bool operator <(const Point &a,const Point &b)
{
	return (a.x==b.x)?(a.y<b.y):(a.x<b.x);
}

double dot(const Point &a,const Point &b)
{
	return a.x*b.x+a.y*b.y;
}

double cross(const Point &a,const Point &b)
{
	return a.x*b.y-a.y*b.x;
}

int ccw(const Point &a,Point b,Point c)
{
	b-=a;
	c-=a;
	double rotdir=cross(b,c);
	if(rotdir>EPS)		return ID_CCW;
	if(rotdir<-EPS)		return ID_CW;
	if(dot(b,c)>EPS)	return ID_GO;
	return ID_BACK;
}

Polygon ConvexHull(vector<Point> ps)
{
	Polygon ch;
	int n=ps.size();
	sort(ps.begin(),ps.end());

	vector<Point> ch_u(n);
	int n_u=0;
	for(int i=n-1;i>=0;i--){
		ch_u[n_u++]=ps[i];
		while(n_u>=3 && ccw(ch_u[n_u-3],ch_u[n_u-2],ch_u[n_u-1])!=ID_CCW){
			ch_u[n_u-2]=ch_u[n_u-1];
			n_u--;
		}
	}

	vector<Point> ch_l(n);
	int n_l=0;
	for(int i=0;i<n;i++){
		ch_l[n_l++]=ps[i];
		while(n_l>=3 && ccw(ch_l[n_l-3],ch_l[n_l-2],ch_l[n_l-1])!=ID_CCW){
			ch_l[n_l-2]=ch_l[n_l-1];
			n_l--;
		}
	}

	for(int i=0;i<n_u-1;i++)	ch.pb(ch_u[i]);
	for(int i=0;i<n_l-1;i++)	ch.pb(ch_l[i]);
	return ch;
}

int main()
{
	for(int n;scanf("%d",&n),n;){
		vector<Point> p(n);
		for(int i=0;i<n;i++)	scanf("%lf,%lf",&p[i].x,&p[i].y);
		printf("%d\n",n-ConvexHull(p).size());
	}

	return 0;
}