#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#define EPS (1e-10)
using namespace std;

class Point{
public:
  double x,y;
  Point (double x = 0,double y = 0): x(x),y(y){}
  Point operator + (Point &p){ return Point(x+p.x,y+p.y);}
  Point operator - (Point &p){ return Point(x-p.x,y-p.y);}
  Point operator * (double k){ return Point(x*k,y*k);}
  bool operator < (const Point &p)const {
    if(x == p.x) return y < p.y;
    else return x < p.x;
  }
};

double cross(Point a,Point b){
  return a.x * b.y - a.y * b.x;
}

int main(){
  int i,j,n,x,y;
  Point p[100];
  vector<Point> convex;
  while(1){
    cin >> n;
    if(n == 0) break;
    for(i=0;i<n;i++) scanf("%lf,%lf",&p[i].x,&p[i].y);
    sort(p,p+n);

    convex.push_back(p[0]);
    convex.push_back(p[1]);

    j = 1;
    for(i=2;i<n;i++){
      Point a = convex[j] - convex[j-1];
      Point b = p[i] - convex[j-1];
      if(cross(a,b) > EPS){
	convex.pop_back();
	i--;
	j--;
      }
      else{
	convex.push_back(p[i]);
	j++;
      }
    }
    
    convex.push_back(p[n-2]);
    for(i=n-3;i>=0;i--){
      Point a = convex[j] - convex[j-1];
      Point b = p[i] - convex[j-1];
      if(cross(a,b) > EPS){
	convex.pop_back();
	i++;
	j--;
      }
      else{
	convex.push_back(p[i]);
	j++;
      }
    }

    cout << n - (j + 1) << endl;//テδづつステδεつδ甘つ」1
    convex.clear();

  }
  return 0;
}