#include <cstdio>
#include <complex>
#include <vector>
#include <algorithm>
using namespace std;

typedef complex<double> P;

double cross(const P& a, const P& b)
{
	return a.real() * b.imag() - a.imag() * b.real();
}

struct comp
{
	bool operator()(const P& a, const P& b) const
	{
		return a.real() == b.real() ? a.imag() < b.imag() : a.real() < b.real();
	}
};

vector<P> convex_hull(vector<P>& ps)
{
	sort(ps.begin(), ps.end(), comp());
	int k = 0, n = ps.size();
	vector<P> qs(n * 2);
	
	for(int i = 0; i < n; ++i){
		while(k > 1 && cross(qs[k-1] - qs[k-2], ps[i] - qs[k-1]) <= 0) k--;
		qs[k++] = ps[i];
	}
	
	for(int i = n - 2, t = k; i >= 0; --i){
		while(k > t && cross(qs[k-1] - qs[k-2], ps[i] - qs[k-1]) <= 0) k--;
		qs[k++] = ps[i];
	}
	qs.resize(k-1);
	return qs;
}

int main()
{
	int n;
	double x, y;
	vector<P> ps;
	while(1){
		scanf("%d", &n);
		if(n == 0) break;
		
		ps.resize(n);
		for(int i = 0; i < n; ++i){
			scanf("%lf,%lf", &x, &y);
			ps[i] = P(x,y);
		}
		
		printf("%d\n", n - (int)convex_hull(ps).size());
	}
}