#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm>
#include <numeric>
#include <typeinfo>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <ctime>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

typedef complex<double> Point;

struct Line{
	Point pos,dir;
	Line(){}
	Line(Point pos,Point dir):pos(pos),dir(dir){}
};

namespace std
{
	bool operator<(const Point& lhs,const Point& rhs)
	{
		if(real(lhs)==real(rhs))
			return imag(lhs)<imag(rhs);
		else
			return real(lhs)<real(rhs);
	}
}

const double EPS=1.0e-10;

inline int Signum(double x)
{
	return abs(x)<EPS?0:x>0?1:-1;
}

double Dot(Point p1,Point p2)
{
	return real(conj(p1)*p2);
}

double Cross(Point p1,Point p2)
{
	return imag(conj(p1)*p2);
}

int CCW(Point a,Point b,Point c)
{
	Point d1=b-a,d2=c-a;
	double sign=Signum(Cross(d1,d2));
	
	if(sign)
		return sign;	// 1:ccw,-1:cw
	if(Dot(d1,d2)<-EPS)
		return -2;		// c-a-b
	if(norm(d1)<norm(d2)-EPS)
		return 2;		// a-b-c
	return 0;			// a-c-b
}

void ConvexHull(const vector<Point> _points,vector<Point>& vertices)
{
	vector<Point> points(_points);
	vertices.clear();
	
	sort(allof(points));
	
	vector<Point> lv,uv;
	rep(i,points.size()){
		Point p=points[i];
		if(lv.size()<2){
			lv.push_back(p);
			continue;
		}
		Point p0=lv[lv.size()-2];
		Point p1=lv[lv.size()-1];
		if(CCW(p0,p1,p)==1)
			lv.push_back(p);
		else{
			lv.pop_back();
			i--;
		}
	}
	rep(i,points.size()){
		Point p=points[points.size()-1-i];
		if(uv.size()<2){
			uv.push_back(p);
			continue;
		}
		Point p0=uv[uv.size()-2];
		Point p1=uv[uv.size()-1];
		if(CCW(p0,p1,p)==1)
			uv.push_back(p);
		else{
			uv.pop_back();
			i--;
		}
	}
	rep(i,lv.size()-1)
		vertices.push_back(lv[i]);
	rep(i,uv.size()-1)
		vertices.push_back(uv[i]);
	//puts("lv");
	//rep(i,lv.size())
	//	cout<<real(lv[i])<<" "<<imag(lv[i])<<endl;
	//puts("uv");
	//rep(i,uv.size())
	//	cout<<real(uv[i])<<" "<<imag(uv[i])<<endl;
	//puts("finish");
}

int main()
{
	for(int n;cin>>n,n;){
		vector<Point> points(n);
		rep(i,n)
			scanf("%lf,%lf",&real(points[i]),&imag(points[i]));
		vector<Point> vertices;
		ConvexHull(points,vertices);
		//rep(i,vertices.size())
		//	cout<<real(vertices[i])<<" "<<imag(vertices[i])<<endl;
		cout<<points.size()-vertices.size()<<endl;
	}
	
	return 0;
}