//Enclose Pins with a Rubber Band
#include<bits/stdc++.h>
using namespace std;
typedef complex<double> p;

namespace std{
  bool operator<(const p& a, const p& b){
    return real(a)!=real(b) ? real(a)<real(b) : imag(a)<imag(b);
  }
}
double cross(const p&a, const p& b){
  return imag(conj(a)*b);
}
double dot(const p& a, const p& b){
  return real(conj(a)*b);
}
int ccw(p a, p b, p c){
  b-=a; c-=a;
  if(cross(b,c)>0)return +1;
  if(cross(b,c)<0)return -1;
  if(dot(b,c)<0)return +2;
  if(norm(b)<norm(c))return -2;
  return 0;
}
vector<p> convex_hull(vector<p> ps){
  int n=ps.size(), k=0;
  sort(ps.begin(), ps.end());
  vector<p> ch(2*n);
  for(int i=0; i<n; ch[k++]=ps[i++])
    while(k>=2 && ccw(ch[k-2], ch[k-1], ps[i])<=0) --k;
  for(int i=n-2, t=k+1; i>=0; ch[k++]=ps[i--])
    while(k>=t&&ccw(ch[k-2], ch[k-1], ps[i])<=0) --k;
  ch.resize(k-1);
  return ch;
}

int main(){
  int n;
  complex<double> pt;
  vector<p> ps;
  while(true){
    cin>>n;
    ps.clear();
    if(n==0)break;
    for(int i=0; i<n; i++){
      scanf("%lf,%lf", &real(pt), &imag(pt));
      ps.push_back(pt);
    }
    cout<<n-convex_hull(ps).size()<<endl;
  }
  return 0;
}