#include<iostream>
#include<cstdio>
#include<algorithm>
#include<complex>
#include<cmath>
#include<vector>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define all(v) v.begin(),v.end()
using namespace std;
typedef complex<double> Point;

double cross(Point a,Point b){
	return real(a)*imag(b)-imag(a)*real(b);
}

int main(){
	int n;
	while(cin>>n,n){
		Point dt[n],alt;
		vector<Point> p;
		rep(i,n)scanf("%lf,%lf",&dt[i].real(),&dt[i].imag());
		for(int i=n-1;i>0;i--){
			if(dt[i-1].real()>dt[i].real()){
				alt=dt[i];
				dt[i]=dt[i-1];
				dt[i-1]=alt;
			}
		}
		p.pb(dt[0]);
		while(1){
			alt=p[p.size()-1];
			bool yon=true;
			rep(i,n){
				if(dt[i]==alt)continue;
				bool check=true;
				rep(j,n){
					Point a=dt[i]-alt,b=dt[j]-dt[i];
					if(i==j || dt[j]==alt)continue;
					if(cross(dt[i]-alt,dt[j]-dt[i])>0){
						check=false;
						break;
					}
				}
				if(check){
					p.pb(dt[i]);
					yon=false;
					break;
				}
			}
			if(yon)break;
			if(p[p.size()-1]==p[0]){
				p.erase(p.end()-1);
				break;
			}
		}
		cout<<n-p.size()<<endl;
	}
	return 0;
}