#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count etc.
#include <cstdlib>	// require abs
#include <cstdio>	// require printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>	// require tolower, toupper
#include <fstream>	// require freopen
#include <complex>
#define EPS (1e-9)
#define EQ(a,b) (abs((a)-(b)) < EPS)

using namespace std;

typedef complex<double> P;

double stod (string str )
{
	stringstream ss (str );
	double res;

	ss >> res;

	return res;
}

bool cmp (P a, P b )
{
	if (a.real() != b.real() )
		return a.real() < b.real();

	return a.imag() > b.imag();
}

// OÏ (cross product) : a~b = |a||b|sinÆ
double cross(P a, P b )
{
	double res = a.real() * b.imag() - a.imag() * b.real();

  return res;
}

int main()
{
//	cut here before submit 
//	freopen ("testcase.rubber", "r", stdin );
	int n;
	while (cin >> n, n ){

		if (n == 3 ){
			cout << n << endl;
			return 0;
		} // end if

		vector <P> pos (n);
		for (int i = 0; i < n; i++ ){
			string str = "";
			cin >> str;
			double x = stod (str.substr (0, str.find (',') ) );
			double y = stod (str.substr (str.find (',') + 1) );
			P p; p.real() = x; p.imag() = y;
			pos[i] = p;
		} // end for

		// Åà¶[Ì_AxÀWª¯¶ÈçyÀWªå«¢_ÉÈéæ¤É\[g
		sort (pos.begin(), pos.end(), cmp );
		
		vector <P> u, d;
		u.push_back (pos[0] );
		for (int i = 1; i < pos.size(); i++ ){
			if (pos[i].imag() >= pos[0].imag() ){
				u.push_back (pos[i] );
			}else{
				d.push_back (pos[i] );
			} // end if
		} //end for

		// ã¼ªÌTõ
		vector <P> U;
		U.push_back (u[0] );
		if (u.size() >= 2 ){
			U.push_back (u[1] );
		}// end if
		if (u.size() > 2 ){
			for (int i = 2; i < u.size(); i++ ){
				U.push_back (u[i] );
				if (U.size() >= 3 ){
					int last  = U.size() - 1;
					int mid   = U.size() - 2;
					int first = U.size() - 3;
					// ÅãÌ_ªEñèÈç½àµÈ¢
					if (cross (U[mid] - U[first], U[last] - U[first] ) < 0. ){
							continue;
					// ÅãÌ_ª¼üãÉÚÁÄ¢éÜ½Í¶ñèÉ é
					}else{
						vector <P>::iterator it = U.begin();
						for (; it != U.end(); ++it ){
							if ((*it) == U[mid] ){
								U.erase (it );
								break;
							} // end if
						} // end for
					} // end if
				} // end if
			} // end for
		} // end if

		// º¼ªÌTõ
		vector <P> D;
		if (!d.empty() ) {
			if (d.size() == 1 ){
			D.push_back (d[0] );
			}else
			if (d.size() >= 2 ){
				int m = d.size();
				D.push_back (d[m-1] ); D.push_back (d[m-2] );
				if (m >= 3 ){
					for (int i = m - 3; i >= 0 ; i-- ){
						D.push_back (d[i] );
						if (D.size() >= 3 ){
							int last  = D.size() - 1;
							int mid   = D.size() - 2;
							int first = D.size() - 3;
							// ÅãÌ_ªEñèÈç½àµÈ¢
							if (cross (D[mid] - D[first], D[last] - D[first] ) < 0. ){
								continue;
							// ÅãÌ_ª¼üãÉÚÁÄ¢éÜ½Í¶ñèÉ é
							}else{
								vector <P>::iterator jt = D.begin();
								for (; jt != D.end(); ++jt ){
									if ((*jt) == D[mid] ){
										D.erase (jt );
										break;
									} // end if
								} // end for
							} // end if
						} // end if
					} // end for
				} // end if
			} // end if
		} // end if

		// ã¼ªÆº¼ªð}[W
		vector <P> R;
		if (!U.empty() )
			for (int i = 0; i < U.size(); i++ )
				R.push_back (U[i] );

		if (!D.empty() ){
			for (int i = 0; i < D.size(); i++ ){
				bool found = false;
				for (int j = 0; j < R.size(); j++ ){
					if (EQ (R[j], D[i] ) ){
						found = true;
						break;
					} // end if
				} // end for
				if (found ){
					continue;
				}else{
					R.push_back (D[i] );
				} // end if
			} // end for
		} // end if

//		for (int i = 0; i < R.size(); ++i ){
//			cout << '(' << R[i].real() << ',' << R[i].imag() << ')' << endl;
//		} // end for

		cout << ( pos.size() - R.size()) << endl;

	} // end loop
		
	return 0;
}