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

using namespace std;
#define rep2(x,from,to) for(int x = (from); x < (to); ++(x))
#define rep(x,to) rep2(x,0,to)
typedef pair<double, double> dpair;

bool isLeft(dpair p1, dpair p2, dpair p3) {
	int r = (p2.first - p1.first) * (p3.second - p2.second) - (p2.second - p1.second) * (p3.first - p2.first);
 	if(r > 0)  return true;
	return false;
}
struct pairsort {
	bool operator()(const dpair& x, const dpair& y) const {
		if(x.first == y.first) return y.second < x.second;
		return x.first < y.first;
	}
};
int main() {
	int n;
	while(cin >> n && n) {
		vector<dpair> v;
		rep(i,n) {
			double x, y;
			scanf("%lf,%lf", &x, &y);
			v.push_back(make_pair(x,y));
		}
		sort(v.begin(), v.end(), pairsort());
		vector<pair<int, dpair> > v1;
		v1.push_back(make_pair(0, v[0]));
		v1.push_back(make_pair(1, v[1]));
		rep2(i,2,n) {
			v1.push_back(make_pair(i, v[i]));
			while(v1.size() >= 3 && isLeft(v1[v1.size()-3].second, v1[v1.size()-2].second, v1[v1.size()-1].second)) {
				v1.erase(--(--v1.end()));
			}
		}
		vector<pair<int, dpair> > v2;
		v2.push_back(make_pair(n-1, v[n-1]));
		v2.push_back(make_pair(n-2, v[n-2]));
		for(int i = n - 3; i >= 0; --i) {
			v2.push_back(make_pair(i, v[i]));
			while(v2.size() >= 3 && isLeft(v2[v2.size()-3].second, v2[v2.size()-2].second, v2[v2.size()-1].second)) {
				v2.erase(--(--v2.end()));
			}
		}
		cout << n - (v1.size() + v2.size() - 2) << endl;
	}
	return 0;
}