#include<iostream>
#include<complex>
#include<cstdio>
using namespace std;
typedef complex<double> p;

double det(p a,p b)
{
	return a.real()*b.imag()-a.imag()*b.real();
}

bool comp(p a,p b)
{
	if(a.real()!=b.real()) return a.real()<b.real();
	return a.imag()<b.imag();
}

int main()
{
	int n;
	while(cin>>n,n)
	{
		p ps[n];
		for(int i = 0; i < n; ++i)
		{
			scanf("%lf,%lf",&ps[i].real(),&ps[i].imag());
		}

		sort(ps,ps+n,comp);
		int k=0;
		p qs[n*2];

		for(int i = 0; i < n; ++i)
		{
			while(k>1&&det(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&&det(qs[k-1]-qs[k-2],ps[i]-qs[k-1])<=0) --k;
			qs[k++]=ps[i];
		}

		cout<<n-k+1<<endl;
	}
  return 0;
}