#include <cstdio>
#include <vector>
#include <complex>
#include <algorithm>
using namespace std;

#define X real()
#define Y imag()

typedef complex<double> Point;

namespace std {
  bool operator < (Point a, Point b) {
    if (a.X != b.X) return a.X < b.X;
    return a.Y < b.Y;
  }
}

double dot(Point a, Point b) {
  return (conj(a)*b).X;
}

double cross(Point a, Point b) {
  return (conj(a)*b).Y;
}

bool ccw(Point a, Point b, Point c) {
  return cross(c-b, a-b) > 0.0;
}

vector<Point> ps;

vector<Point> Graham(vector<Point> &ps) {
  vector<Point> qs;

  qs.resize(ps.size()*2);
  sort(ps.begin(), ps.end());

  int k = 0;
  for (int i=0; i<ps.size(); i++) {
    while (k > 1 && !ccw(qs[k-2], qs[k-1], ps[i])) --k;
    qs[k++] = ps[i];
  }

  int _k = k;
  for (int i=ps.size()-1; i>=0; i--) {
    while (k > _k && !ccw(qs[k-2], qs[k-1], ps[i])) --k;
    qs[k++] = ps[i];
  }

  qs.resize(k-1);
  return qs;
}

int main() {
  while (1) {
    int n;
    scanf("%d", &n);
    if (n == 0) return 0;

    ps.resize(n);
    for (int i=0; i<n; i++) {
      double x, y;
      scanf("%lf,%lf", &x, &y);
      ps[i] = Point(x, y);
    }

    vector<Point> convs = Graham(ps);
    printf("%d\n", n-(int)convs.size());
  }
}