#include<iostream>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<map>
using namespace std;
#define int long long
pair<double,double> operator+(const pair<double,double> &v1, const pair<double,double> &v2){
	return pair<double, double>(v1.first+v2.first,v1.second+v2.second);
}
pair<double,double> operator-(const pair<double,double> &v1, const pair<double,double> &v2){
	return pair<double, double>(v1.first-v2.first,v1.second-v2.second);
}
double inner_product(pair<double, double> v1, pair<double, double> v2){
	return v1.first*v2.first+v1.second*v2.second;
}
double outer_product(pair<double, double> v1, pair<double, double> v2){
	return v1.first*v2.second-v1.second*v2.first;
}
double angle(pair<double, double> p1,
		pair<double,double> p2,
		pair<double,double> p3){
	auto v1 = p1-p2;
	auto v2 = p3-p2;
	auto ip = inner_product(v1,v2);
	auto op = (outer_product(v1,v2)>0)?1:-1;
	auto l1 = hypot(v1.first,v1.second);
	auto l2 = hypot(v2.first,v2.second);
	return acos(ip/l1/l2)*op;
}
signed main(){
	int a;
	while( scanf("%lld", &a) != EOF ){
		if(a==0) break;
		vector<pair<double,double>> vertex;
		for(int i=0;i<a;i++){
			double x,y;
			scanf("%lf,%lf",&x,&y);
			vertex.push_back(pair<int,int>(x,y));
		}
		sort(vertex.begin(),vertex.end());
		double tx=0,ty=0;
		for(int i=0;i<a;i++){
			tx += vertex[i].first;
			ty += vertex[i].second;
		}
		tx /= a;
		ty /= a;
		vector<int> visited(vertex.size(),0);
		vector<pair<int,int>> edges;
		auto prev = -1;
		auto now = 0;
		auto counter = 0;
		while(true){
			if(visited[now]==1) break;
			counter += 1;
			visited[now] = 1;
			auto maxe = -100.0;
			auto next = -1;
			for(int i=0;i<a;i++){
				if(i==now||i==prev) continue;
				auto pv = (prev==0)?pair<double,double>(tx,ty):vertex[prev];
				auto ta = angle(pv, vertex[now], vertex[i]);
				if(maxe<ta){
					maxe = ta;
					next = i;
				}
			}
			prev = now;
			now = next;
		}
		cout << a-counter << endl;
	}
	return 0;
}