#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

const double PI = 3.14159;

int main()
{
	while (true) {
		int n;
		cin >> n;
		if (n==0) break;
		
		vector<double> x; x.reserve(100);
		vector<double> y; y.reserve(100);
		double tmp_x, tmp_y;
		char dummy;
		for (int i=0; i<n; i++) {
			cin >> tmp_x >> dummy >> tmp_y;
			x.push_back(tmp_x); y.push_back(tmp_y);
		}
		
		double min_y = y[0];
		int min_y_index = 0;
		for (int i=1; i<n; i++) {
			if (min_y > y[i]) { min_y = y[i]; min_y_index = i; }
		}
		
		int curr_index = min_y_index;
		int circumference_points = 0;
		double curr_deg = 0.0;
		do {
			double min_deg = PI;
			double min_deg_index;
			double tmp_deg;
			for (int i=0; i<n; i++) {
				if (i == curr_index) continue;
				tmp_deg = atan2( y[i] - y[curr_index], x[i] - x[curr_index] );
				tmp_deg -= curr_deg;cout << min_deg_index << " " <<
				tmp_deg += (tmp_deg < 0) ? 2*PI : 0;
				if ( min_deg > tmp_deg ) {
					min_deg = tmp_deg; min_deg_index = i;
				}
			}
			curr_deg += min_deg;
			curr_index = min_deg_index;
			circumference_points++;
			// cout << min_deg_index << " " << curr_deg * 180 / PI << endl;
		} while (curr_index != min_y_index);
		
		cout << n - circumference_points << endl;
	}
	
	return 0;
}