#include<cstdio>
#include<complex>
#include<vector>
#include<algorithm>

#define pb push_back
#define sz size()
using namespace std;

typedef complex<double> P;

namespace std{
  bool operator<(const P &a,const P &b){
    return real(a)==real(b)?imag(a)<imag(b):real(a)<real(b);
  }
}

double cross(P x,P y){return imag(conj(x)*y);}

vector<P> convex_hull(vector<P> v){
  int n = v.sz, k = 0;
  sort(v.begin(),v.end());
  vector<P> r(2*n);
  for(int i=0;i<n;i++){
    while(k>1 && cross(r[k-1]-r[k-2],v[i]-r[k-1]) <= 0)k--;
    r[k++] = v[i];
  }
  for(int i=n-2,t=k;i>=0;i--){
    while(k>t && cross(r[k-1]-r[k-2],v[i]-r[k-1]) <= 0)k--;
    r[k++] = v[i];
  }
  r.resize(k-1);
  return r;
}

int main(){
  int n;
  vector<P> v;
  P tmp;

  while(scanf("%d",&n),n){
    v.clear();
    for(int i=0;i<n;i++){
      scanf("%lf,%lf",&real(tmp),&imag(tmp));
      v.pb(tmp);
    }

    printf("%d\n",n-(int)convex_hull(v).sz);
  }
}