#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cmath>
#include <cassert>
#include <complex>
using namespace std;

typedef complex<double> Point;
namespace std {
  bool operator<(Point a, Point b) {
    if (a.real() == b.real())
      return a.imag() < b.imag();
    else
      return a.real() < b.real();
  }
}

int ccw(Point p1, Point p2, Point p3)
{
  p2 -= p1;
  p3 -= p1;
  double det = (conj(p2)*p3).imag();
  if (det > 0) return 1;
  if (det < 0) return -1;
  return 0;
}

vector<Point> convex_hull(vector<Point>& ps)
{
  int n = ps.size(), k = 0;
  sort(ps.begin(), ps.end());
  vector<Point> ch(2*n);
  for (int i = 0; i < n; ch[k++] = ps[i++]) // lower-hull
    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--]) // upper-hull
    while (k >= t && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
  ch.resize(k-1);
  return ch;
}

int main()
{
  int N;
  while (scanf("%d", &N), N) {
    vector<Point> ps;
    for (int i = 0; i < N; ++i) {
      double x, y;
      scanf("%lf,%lf", &x, &y);
      ps.push_back(Point(x, y));
    }
    vector<Point> ch(convex_hull(ps));
    printf("%d\n", N - ch.size());
  }
}