#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;
typedef pair<double,double>P;
#define X first
#define Y second
#define pb push_back

double mag(P p){
	//2次元ベクトルの大きさ
	return sqrt(p.X*p.X+p.Y*p.Y);
}

double inner(P a,P b){
	//2次元ベクトルの内積
	return a.X*b.X+a.Y*b.Y;
}

double inner_rad(P a,P b){
	//2つのベクトル間の角度
	return acos(inner(a,b)/mag(a)/mag(b));
}

int main(){
	int n;
	while(cin>>n,n){
		vector<P>V;
		for(int i=0;i<n;i++){
			double x,y;
			scanf("%lf,%lf",&x,&y);
			V.pb(P(x,y));
			
			//cout<<"# "<<x<<","<<y<<endl;
		}
		
		
		
		int st=0;
		for(int i=1;i<V.size();i++){
			if(V[i].Y<V[st].Y ||( V[i].Y==V[st].Y && V[i].X>V[st].X))st=i;
		}
		int use=1;
		int now=st;
		P last=P(-10000,V[st].Y);
		
		while(true){
			//if(use>7)break;
			//cout<<last.X<<","<<last.Y<<" : "<<V[now].X<<","<<V[now].Y<<" : ";
			int next=now;
			double rad=0;
			for(int i=0;i<V.size();i++){
				if(i!=now){
					//cout<<"# "<<last.X<<","<<last.Y<<" : "<<V[now].X<<","<<V[now].Y<<" : "<<V[i].X<<","<<V[i].Y<<" : "<<inner_rad(P(last.X-V[now].X,last.Y-V[now].Y),P(V[i].X-V[now].X,V[i].Y-V[now].Y))<<endl;
					if(inner_rad(P(last.X-V[now].X,last.Y-V[now].Y),P(V[i].X-V[now].X,V[i].Y-V[now].Y))>rad){
						next=i;
						rad=inner_rad(P(last.X-V[now].X,last.Y-V[now].Y),P(V[i].X-V[now].X,V[i].Y-V[now].Y));
					}
				}
			}
			//cout<<V[next].X<<","<<V[next].Y<<endl;
			if(next==st){
				break;
			}
			use++;
			last=V[now];
			now=next;
		}
		
		cout<<n-use<<endl;
	}
	
	return 0;
}
