#include <iostream>
#include <algorithm>
#include <utility>
#include <cstdio>
#include <cassert>
#include <vector>
#include <cmath>
using namespace std;

#define sqr(x) ((x) * (x))

int main() {
	int n;

	while(cin >> n, n) {
		vector<pair<double,double> > v;
		vector<pair<double,double> > a;
		pair<double,double> prev;

		for(int i = 0; i < n; i++) {
			pair<double,double> tmp;

			scanf("%lf,%lf", &tmp.first, &tmp.second);
			v.push_back(tmp);
		}

		sort(v.begin(), v.end());
		a.push_back(v[0]);
		prev.first = 0;
		prev.second = 1;

		do {
			double theta = 10;
			int next_v = -1;
			pair<double,double> next_prev;

			for(int i = 0; i < v.size(); i++) {
				pair<double,double> tmp;
				double tmp_cos;
				double tmp_theta;

				tmp.first = v[i].first - a[a.size() - 1].first;
				tmp.second = v[i].second - a[a.size() - 1].second;

				if(tmp.first == 0 && tmp.second == 0)
					continue;

				tmp_cos = (prev.first * tmp.first + prev.second * tmp.second) / (sqrt(sqr(prev.first) + sqr(prev.second)) * sqrt(sqr(tmp.first) + sqr(tmp.second)));
				tmp_theta = acos(tmp_cos);

				if(tmp_theta < theta) {
					theta = tmp_theta;
					next_v = i;
					next_prev = tmp;
				}
			}

			assert(next_v >= 0);
			a.push_back(v[next_v]);
			prev = next_prev;
		} while(a[0] != a[a.size() - 1]);

		cout << v.size() - a.size() + 1 << endl;
	}
	
	return 0;
}