#include <iostream>
#include <vector>
#include <complex>
#include <climits>
#include <cmath>

using namespace std;
typedef complex<double> P;

#define EPS (1e-10)
#define PI (acos(-1.0))
#define EQ(a,b) (abs((a)-(b)) < EPS)
#define POSARG(a) (arg(a) > 0.0? arg(a) : 2.0*PI + arg(a))

int n;

vector<P>::iterator convex_hull(vector<P>& vc)
{
	int undermost = 0;
	
	for(int i = 1; i < (int)vc.size(); i++)
	{
		if( vc[i].imag() < vc[undermost].imag() 
			||( EQ(vc[undermost].imag(), vc[i].imag()) && vc[undermost].real() < vc[i].real() ) )
		{
			undermost = i;
		}
	}
	
	swap(vc[0], vc[undermost]);

	double nowarg = 0.0;
	int j;
	
	for( j = 0; j < (int)vc.size()-1; j++)
	{
		double minarg = 2.0*PI;
		double maxdst = 0.0;
		int candidx = 0;
		
		for(int i = j+1; i < (int)vc.size(); i++)
		{
			double newarg = POSARG(vc[i] - vc[j]);
			double newdst = abs(vc[i] - vc[j]);
			
			if( newarg > nowarg || EQ(newarg, nowarg))
				if( newarg < minarg || ( EQ(newarg, minarg) && newdst > maxdst) )
				{
					minarg = newarg;
					maxdst = newdst;
					candidx = i;
				}
			
		}

		if(candidx == 0)
		{
			break;
		}
		else
		{
			swap(vc[j+1], vc[candidx]);
			nowarg = minarg;
		}
	}
	
	return vc.begin()+j+1;
}

int solve(vector<P> vc)
{
	vector<P>::iterator r = convex_hull(vc);
	return vc.end() - r;
}

int main()
{
	while(cin >> n, n)
	{
		vector<P> vc;
		vc.clear();
		
		for(int i = 0; i < n; i++)
		{
			char c;
			double a, b;
			cin >> a;
			cin >> c;
			cin >> b;
			vc.push_back(P(a, b));
		}
		
		cout << solve(vc) << endl;
	}
	
	return 0;
}