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

using namespace std;

class Point{
public:
	double x,y;
	bool done;
	bool operator<(const Point &p) const{
		if( x < p.x ) return true;
		else return false;
	}
};
class Vector{
public:
	double x,y,z;
	Vector():x(0.0),y(0.0),z(0.0){}
	Vector(Point po,Point pt){
		x = pt.x - po.x;
		y = pt.y - po.y;
		z = 0.0;
	}
};

Vector Cross(Vector va, Vector vb){
	Vector vret;
	vret.x = va.y * vb.z - vb.y * va.z;
	vret.y = va.z * vb.x - vb.z * va.x;
	vret.z = va.x * vb.y - vb.x * va.y;
	return vret;
}

int main(void){
	while( true ){
		int cnt = 0;
		int nowPoint = 0;
		int n;
		vector<Point> vPoints;

		scanf("%d", &n);
		if( n == 0 ) break;

		for(int i = 0; i < n; i++){
			Point p;
			scanf("%lf,%lf", &p.x, &p.y);
			p.done = false;
			vPoints.push_back( p );
		}
		sort(vPoints.begin(), vPoints.end());

		vPoints[nowPoint].done = true;
		do{
			for(int i = 0; i < n; i++){
				if( !vPoints[i].done ){
					Vector vo(vPoints[nowPoint],vPoints[i]);
					bool isPerimeter = true;
			
					vPoints[i].done = true;
					for(int j = 0; j < n; j++){
						if( !vPoints[j].done ){
							Vector vt(vPoints[nowPoint],vPoints[j]);
							Vector cr = Cross(vo, vt);
					
							if( cr.z > 0 ){
								isPerimeter = false;
								break;
							}
						}
					}
					if( !isPerimeter ) vPoints[i].done = false;
					else{
						nowPoint = i;
						vPoints[0].done = false;
						break;
					}
				}
			}
		}while( nowPoint != 0 );

		vPoints[0].done = true;
		for(int i = 0; i < n; i++){
			if( !vPoints[i].done ) cnt++;
		}
		cout << cnt << endl;
	}
	return 0;
}