#include <iostream>
#include <math.h>
#include <algorithm>

using namespace std;

typedef pair<double,double> P;

double d(P p1, P p2){
	return (p1.first-p2.first)*(p1.first-p2.first)+(p1.second-p2.second)*(p1.second-p2.second);
}
int main(){
	int n;
	cin >> n;
	while(n){
		P p[n];
		char c;
		for(int i = 0; i < n; i++){
			cin >> p[i].first >> c >> p[i].second;
		}
		sort(p, p+n);
		P* cp = p;
		int sum = 0;
		double prevT = 0;
		do{
			sum++;
			double minT = 7;
			P *nextP = p;
			for(int i = 0; i < n; i++){
				if(&p[i] != cp){
					double T = atan2(p[i].second-(*cp).second,p[i].first-(*cp).first)-prevT;
					if(T < 0){
						T += M_PI*2;
					}
					if(T == minT){
						if(d(*cp, p[i]) > d(*cp, *nextP)) nextP = &p[i];
					}else if(T < minT){
						minT = T;
						nextP = &p[i];
					}
				}
			}
			cp = nextP;
			prevT += minT;
		}while(cp != p);
		cout << n-sum-1 << endl;
		cin >> n;
	}
}