#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <sstream>
#include <cassert>
#include <list>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;
typedef pair<int,int> PI;
typedef vector<int> vi;
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define F first
#define S second
 
 
main(){
  int n;
  while(cin>>n,n){
    double x[n],y[n];
    double sx=100000;
    int used[n];
    int si;

    rep(i,n){
      cin>>x[i];
      cin.get();
      cin>>y[i];
      used[i]=false;
      if(x[i]<sx){
	sx=x[i];
	si=i;
      }
    }

    used[si]=true;

    int ni=0;
    sx=100000;
    rep(i,n){
      if(i==si)continue;
      double dx=x[i]-x[si],dy=y[i]-y[si];
      double t=atan2(dy,dx);
      if(t<sx){
	sx=t;
	ni=i;
      }
    }

    used[ni]=true;

    while(true){
      double nt=-1000000;
      int nni;
      double dx1=x[ni]-x[si],dy1=y[ni]-y[si];
      rep(i,n){
	if(i==si || i==ni)continue;
	double dx2=x[i]-x[ni],dy2=y[i]-y[ni];

	double t=(dx1*dx2+dy1*dy2)/sqrt(dx1*dx1+dy1*dy1)/sqrt(dx2*dx2+dy2*dy2);
	if(t>nt){
	  nt=t;
	  nni=i;
	}
      }

      if(used[nni])break;
      used[nni]=true;
      si=ni;
      ni=nni;
    }
    int ans=0;
    rep(i,n)if(used[i])++ans;

    cout<<n-ans<<endl;
  }
}