#include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define LOOP(i) while(i--)
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

template<typename T>
class Point2D{
	using Same = const Point2D&;
public:
	T x,y;
	bool operator==(Same rhs){
		return abs(x-rhs.x)<1e-8 && abs(y-rhs.y)<1e-8;
	}
	T operator^(Same rhs){
		return x*rhs.y-rhs.x*y;
	}
	Point2D operator-(Same rhs){
		Point2D res(*this);
		res.x-=rhs.x,res.y-=rhs.y;
		return res;
	}
	double GetNorm(){return hypot(x,y);}
};
using Point2DD = Point2D<double>;

vector<Point2DD> CalcConvexFullVertex(vector<Point2DD>& P){
	int N=P.size();
	Point2DD A=P[0];
	vector<Point2DD> L;
	do{
		L.push_back(A);
		Point2DD B=P[0];
		for(int i=1;i<N;i++){
			Point2DD C=P[i];
			if(B==A){
				B = C;
			}
			else{
				Point2DD AB(B-A),AC(C-A);
				double outer = AB^AC;
				if(outer>0 || (abs(outer)<=1e-8 && AC.GetNorm()>AB.GetNorm())){
					B = C;
				}
			}
		}
		A = B;
	}while(!(A==L[0]));
	return L;
}

int main(){
	//cin.tie(0);
	//ios::sync_with_stdio(false);
	cout<<fixed<<setprecision(10);

	while(true){
		int N=in();
		if(!N) break;
		vector<Point2DD> P(N);
		REP(i,N){
			scanf("%lf,%lf",&P[i].x,&P[i].y);
		}
		sort(ALL(P),[](Point2DD& l,Point2DD& r){return l.x==r.x ? l.y<r.y : l.x<r.x;});
		auto L = CalcConvexFullVertex(P);
		out(N-L.size());
	}
	return 0;
}
