#include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
using namespace std;

const double EPS = 1e-10;

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;
  }

};
typedef Point Vector;

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

int Convex_Hull(vector<Point> v){
  vector<Point> c; //convex
  sort(v.begin(),v.end());
  c.assign(v.begin(),v.begin()+2);

  for(int i=2;i<v.size();i++){
    Vector a = c[c.size()-1] - c[c.size()-2];
    Vector b = v[i] - c[c.size()-2];

    while(cross(a,b) > EPS){
      c.pop_back();
      if(c.size() < 2) break;
      a = c[c.size()-1] - c[c.size()-2];
      b = v[i] - c[c.size()-2];
    }

    c.push_back(v[i]);
  }

  int n = c.size();
  c.push_back(v[v.size()-2]);

  for(int i=v.size()-3;i>=0;i--){
    Vector a = c[c.size()-1] - c[c.size()-2];
    Vector b = v[i] - c[c.size()-2];

    while(cross(a,b) > EPS){
      c.pop_back();
      if(c.size() < n + 1) break;
      a = c[c.size()-1] - c[c.size()-2];
      b = v[i] - c[c.size()-2];
    }

    c.push_back(v[i]);
  }
  c.pop_back();

  return c.size();
}

int main(){
  int n;
  while(cin >> n && n){
    vector<Point> v(n);
    for(int i=0;i<n;i++) scanf("%lf,%lf",&v[i].x,&v[i].y);
    cout << n - Convex_Hull(v) << endl;
  }
  return 0;
}