#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

class Point{
public:
  double x, y;
  int n;
  bool operator < (const Point &s)const{
    if(x==s.x) return y<s.y;
    else return x<s.x;
  }
};

main(){
  int n;
  Point in[100];
  while(1){
    cin >> n;
    if(n==0) break;
    for(int i=0;i<n;i++){
      scanf("%lf,%lf", &in[i].x, &in[i].y);
    }
    sort(in, in+n);
    for(int i=0;i<n;i++) in[i].n=i;
    vector<Point> data;
    Point p, q, r;
    data.push_back(in[0]);
    data.push_back(in[1]);
    for(int i=2;i<n;i++){
      while(1){
	if(i>=n) break;
	p=data[data.size()-2];
	q=data[data.size()-1];
	r=in[i];
	if((q.x-p.x)*(r.y-q.y)-(q.y-p.y)*(r.x-q.x)<=0){
	  data.push_back(r);
	  break;
	}else{
	  data.pop_back();
	  if(data.size()<2){
	    data.push_back(r);
	    i++;
	  }
	}
      }
    }
    bool use[100];
    for(int i=0;i<n;i++) use[i]=false;
    vector<Point>::iterator ite=data.begin();
    for(;ite!=data.end();ite++){
      use[(*ite).n]=true;
    }
    data.clear();
    data.push_back(in[n-1]);
    data.push_back(in[n-2]);
    for(int i=n-3;i>=0;i--){
      while(1){
	if(i<0) break;
	p=data[data.size()-2];
	q=data[data.size()-1];
	r=in[i];
	if((q.x-p.x)*(r.y-q.y)-(q.y-p.y)*(r.x-q.x)<=0){
	  data.push_back(r);
	  break;
	}else{
	  data.pop_back();
	  if(data.size()<2){
	    data.push_back(r);
	    i--;
	  }
	}
      }
    }
    ite=data.begin();
    for(;ite!=data.end();ite++) use[(*ite).n]=true;
    int ans=0;
    for(int i=0;i<n;i++){
      if(!use[i]) ans++;
    }
    cout << ans << endl;
  }
  return 0;
}