#include <bits/stdc++.h>
using namespace std;

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

using coord_t = double;
using coord2_t = double;

struct Point {
  coord_t x, y;

  Point() {}
  Point(coord_t x, coord_t y) : x(x), y(y) {}

  bool operator<(const Point &p) const {
    return x < p.x || (x == p.x && y < p.y);
  }
};

coord2_t cross(const Point &O, const Point &A, const Point &B) {
  return (A.x - O.x) * (B.y - O.y) - (A.y - O.y) * (B.x - O.x);
}

vector<Point> convex_hull(vector<Point> P) {
  int n = P.size(), k = 0;
  if (n == 1) return P;
  vector<Point> H(2 * n);

  sort(P.begin(), P.end());

  for (int i = 0; i < n; ++i) {
    while (k >= 2 && cross(H[k - 2], H[k - 1], P[i]) <= 0) k--;
    H[k++] = P[i];
  }

  for (int i = n - 2, t = k + 1; i >= 0; i--) {
    while (k >= t && cross(H[k - 2], H[k - 1], P[i]) <= 0) k--;
    H[k++] = P[i];
  }

  // cout << "P" << endl;
  // for (int i = 0; i < P.size(); ++i) {
  //   cout << fixed << setprecision(5) << P[i].x << " " << P[i].y << endl;
  // }
  // cout << "H" << endl;
  // for (int i = 0; i < H.size(); ++i) {
  //   cout << fixed << setprecision(5) << H[i].x << " " << H[i].y << endl;
  // }

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

int main() {
  int n;
  while (cin >> n, n) {
    vector<Point> v;
    for (int i = 0; i < n; ++i) {
      double x, y;
      scanf("%lf,%lf", &x, &y);
      // cout << x << " " << y << endl;
      v.push_back(Point(x, y));
    }

    vector<Point> ConvexHull = convex_hull(v);
    cout << n - ConvexHull.size() << endl;

    // for (int i = 0; i < ConvexHull.size(); ++i) {
    //   cout << fixed << setprecision(10) << ConvexHull[i].x << " " << ConvexHull[i].y << endl;
    // }
  }
}