#include <cstdio>
#include <algorithm>
#include <cfloat>
#include <cmath>
using namespace std;

double x[100];
double y[100];

double calcLength(int i, int j) {
  return sqrt((x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]));
}

double calcGradient(int i, int j) {
  return (y[j]-y[i])/(x[j]-x[i]);
}

double calcCos(int i, int j, int k) {
  double t = (x[i]-x[j])*(x[k]-x[j]) + (y[i]-y[j])*(y[k]-y[j]);
  return t / (calcLength(i, j) * calcLength(j, k));
}

int main() {
  int n, v0, v1, v2, v3, vt, c;
  double m = DBL_MAX, t;
  while (1) {
    scanf("%d", &n);
    if (!n) break;
    for (int i=0; i<n; i++) {
      scanf("%lf,%lf", &x[i], &y[i]);
      if (x[i] < m) {
        m = x[i];
        v0 = i;
      }
    }
    v1 = v0;
    m = 0;
    for (int i=0; i<n; i++) {
      if (i==v0) continue;
      if (x[i]==x[v0]) {
        if (y[i]>y[v0]) {
          v2 = i;
          break;
        } else continue;
      } else {
        t = calcGradient(v0, i);
        if (t > m) {
          m = t;
          v2 = i;
        }
      }
    }

    c = 2;
    while (1) {
      m = 1.0;
      for (vt=0; vt<n; vt++) {
        if (vt==v1 || vt==v2) continue;
        t = calcCos(v1, v2, vt);
        if (t < m) {
          m = t;
          v3 = vt;
        }
      }
      if (v3 == v0) break;
      v1 = v2;
      v2 = v3;
      ++c;
    }
    printf("%d\n", n-c);
  }
  return 0;
}