#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) REP(i,0,n)
struct point{
	double x,y;
	point(){}
	point(double x,double y):x(x),y(y){}
};

const double pi=3.1415926535897932;
const double rad=180/pi;

double get_angle(point a, point b, int d, int& D)
{
	double x = b.x - a.x;
	double y = b.y - a.y;
	double ret = atan2(x, y) * rad;
	D = (x < 0 ? (y < 0 ? (4) : (3)) : (y < 0 ? (1) : (2) )) -1;
	return (180-ret);
}

int main(void)
{
	int n;
	point p[100];
	bool used[100];
	while(cin >> n, n){
		int f = -1;
		rep(i,n){
			scanf("%lf,%lf", &p[i].x, &p[i].y);
			used[i] = false;
			if(f == -1 || p[i].x < p[f].x) f = i;
		}
		int t = f, d = 0;
		for(int l = 0;;l = 1){
			if(l && t == f) break;
			double mi;
			int tmp = -1,c = 100000000;
			int dd;
			rep(i,n){
				if(used[i])continue;
				if(t == i)continue;
				int D;
				double ang = get_angle(p[t], p[i], d, D);
				int cc = 0,ddd = d;
				while(D != ddd){
					ddd = (ddd + 1) % 4;
					cc++;
				}
				if(tmp < 0 || cc < c || (c == cc && ang < mi)){
					tmp = i;
					c = cc;
					mi = ang;
					dd = D;
				}
			}
			if(tmp < 0) break;
			t = tmp;
			d = dd;
			used[t] = true;
		}
		printf("%u\n",count(used, used+n, false));
	}
}