#include <iostream>
#include <vector>
#include <complex>
#include <algorithm>
#include <cstdio>

using namespace std;

#define EPS 1e-9

//typedef complex<double> P;

struct P {
	double x, y;
};

typedef vector<P> polygon;

bool operator <(const P& p1, const P& p2) {
	return p1.x < p2.x;
}
P operator -(const P& p1, const P& p2) {
	return (P){p1.x - p2.x, p1.y - p2.y};
}

int F(double v) {
	if ( abs(v) < EPS ) return 0;
	return v < 0 ? -1 : v > 0 ? 1 : 0;
}

double cross(P p1, P p2) {
	return p1.x * p2.y - p1.y * p2.x;
}

int ccw(P& p1, P& p2, P& p3) {
	return F(cross(p2 - p1, p3 - p1));
}

bool check(polygon& t, int comp) {
	int n = t.size();
	if (n < 3) return true;
	return ccw(t[n-3], t[n-2], t[n-1]) != comp;
}

int main() {
	int n;
	while ( cin >> n, n ) {
		vector<P> v;
		for (int i = 0; i < n; ++i) {
			double x, y;
			scanf("%lf,%lf", &x, &y);
			v.push_back( (P){x, y} );
		}
		sort( v.begin(), v.end() );

		int ans = n+2;

		polygon t;
		for (int i = 0; i < v.size(); ++i) {
			t.push_back(v[i]);
			while ( !check(t, 1) ) t.erase( t.end()-2, t.end()-1 );
		}
		ans -= t.size();

		t.clear();
		for (int i = 0; i < v.size(); ++i) {
			t.push_back(v[i]);
			while ( !check(t, -1) ) t.erase( t.end()-2, t.end()-1 );
		}
		ans -= t.size();

		cout << ans << endl;
	}
}