#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm>
#include <numeric>
#include <typeinfo>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

typedef complex<double> Point;

namespace std{
	template<typename T>
		bool operator<(const complex<T>& lhs,const complex<T>& rhs)
		{
			if(real(lhs)==real(rhs))
				return imag(lhs)<imag(rhs);
			else
				return real(lhs)<real(rhs);
		}
}

int main()
{
	for(int n;cin>>n,n;){
		vector<Point> p(n);
		rep(i,n)
			scanf("%lf,%lf",&real(p[i]),&imag(p[i]));

		//rep(i,n)
		//	cout<<real(p[i])<<" "<<imag(p[i])<<endl;

		sort(allof(p));

		vector<Point> uv,lv;
		rep(i,n){
			for(;;){
				if(lv.size()<2){
					lv.push_back(p[i]);
					break;
				}
				else{
					Point p0=lv[lv.size()-2];
					Point p1=lv[lv.size()-1];
					//if(arg(p[i]-p1)>arg(p[i]-p0)){
					double cross=imag(conj(p1-p0)*(p[i]-p0));
					if(cross>0){
						lv.push_back(p[i]);
						break;
					}
					else
						lv.pop_back();
				}
			}
		}
		for(int i=n;i--;){
			for(;;){
				if(uv.size()<2){
					uv.push_back(p[i]);
					break;
				}
				else{
					Point p0=uv[uv.size()-2];
					Point p1=uv[uv.size()-1];
					//if(arg(p[i]-p1)>arg(p[i]-p0)){
					double cross=imag(conj(p1-p0)*(p[i]-p0));
					if(cross>0){
						uv.push_back(p[i]);
						break;
					}
					else
						uv.pop_back();
				}
			}
			//puts("uv");
			//rep(i,uv.size())
			//	cout<<uv[i]<<endl;
		}

		//puts("uv");
		//rep(i,uv.size())
		//	cout<<uv[i]<<endl;

		//puts("lv");
		//rep(i,lv.size())
		//	cout<<lv[i]<<endl;
		
		int vn=uv.size()+lv.size()-2;
		cout<<p.size()-vn<<endl;
	}

	return 0;
}