#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string.h>
#define P pair<double,double>
using namespace std;
double EPS=1e-10;
double add(double a, double b)
{
	if(abs(a+b)<EPS*(abs(a)+abs(b))) return 0;
	return a+b;
}
bool cmp_x(const P& p, const P& q)
{
	if(p.first !=q.first) return p.first<q.first;
	return p.second>q.second;
}
P p[100];
vector<P> v;
vector<int> num;
int n;
bool used[100];
void make_convex(int l,int r)
{
	for(int i=l ;(r>l ? i<r : i>=r);(r>l ? i++ : i--))
	{
		if(used[i]) continue;
		for(bool loop=true;loop; )
		{
			loop=false;
			if(v.size()<2) {v.push_back(p[i]),num.push_back(i),used[i]=true; continue;}
			if(v.size()==2)
			{
				double vx[2],vy[2];
				vx[0]=v[1].first-v[0].first;
				vy[0]=v[1].second-v[0].second;
				vx[1]=p[i].first-v[1].first;
				vy[1]=p[i].second-v[1].second;
				if(add(vx[0]*vy[1],-vx[1]*vy[0])<=0) v.push_back(p[i]),num.push_back(i),used[i]=true;
				else used[num[1]]=false,num.pop_back(),v.pop_back(),loop=true;
				continue;
			}
			double vx[3],vy[3]; int len=v.size();
			vx[0]=v[len-2].first-v[len-3].first;
			vy[0]=v[len-2].second-v[len-3].second;
			vx[1]=v[len-1].first-v[len-2].first;
			vy[1]=v[len-1].second-v[len-2].second;
			vx[2]=p[i].first-v[len-1].first;
			vy[2]=p[i].second-v[len-1].second;
			if(add(vx[1]*vy[2],-vx[2]*vy[1])<=0) v.push_back(p[i]),num.push_back(i),used[i]=true;
			else used[num[len-1]]=false,num.pop_back(),v.pop_back(),loop=true;
		}
	}
}
int main()
{
	while(1)
	{
		cin >> n; if(!n) break;
		v.clear(); num.clear(); memset(used,false,sizeof(used));
		for(int i=0;i<n;i++) scanf("%lf,%lf",&p[i].first,&p[i].second);
		sort(p,p+n,cmp_x);
		//pはxの昇順、yの降順。時計回りで見ること
		make_convex(0,n);
		int tmp=v.size(); v.clear(),num.clear(); memset(used,false,sizeof(used));
		make_convex(n-1,0);
		cout << n-(tmp+v.size()-2) << '\n' ;
	}
}