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

class Point {
public:
  double x;
  double y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  bool operator <(const Point &p) const {
    if(x != p.x) return x < p.x;
    if(y != p.y) return y < p.y;
    return false;
  }
};

typedef Point Vector;

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

int main() {
  while(1) {
    int n;
    cin >> n;
    if(n == 0) break;

    vector<Point> P;
    for(int i = 0; i < n; i++) {
      double x, y;
      scanf("%lf,%lf", &x, &y);
      P.push_back(Point(x, y));
    }

    int ans;
    if(P.size() == 3) {
      ans = 0;
    } else {
      sort(P.begin(), P.end());
      vector<Vector> convex;

      convex.push_back(P[0]);
      convex.push_back(P[1]);
      for(int i = 2; i < P.size(); i++) {
	if(convex.size() != 1 &&
	   cross(Vector(convex.rbegin()->x-(convex.rbegin()-1)->x,
			convex.rbegin()->y-(convex.rbegin()-1)->y ),
		 Vector(P[i].x-P[i-1].x, P[i].y-P[i-1].y)) > 0) {
	  convex.pop_back();
	  i--;
	  continue;
	}
	convex.push_back(P[i]);
      }

      int num = convex.size();
      convex.push_back(P[n-2]);
      for(int i = n-3; i >= 0; i--) {
	if(convex.size() != num &&
	   cross(Vector(convex.rbegin()->x-(convex.rbegin()-1)->x,
	                convex.rbegin()->y-(convex.rbegin()-1)->y ),
		 Vector(P[i-1].x-P[i].x, P[i-1].y-P[i].y)) > 0) {
	  convex.pop_back();
	  i++;
	  continue;
	}
	if(i != 0) convex.push_back(P[i]);
      }

      ans = n - (int)convex.size();
    }

    cout << ans << endl;
  }
  return 0;
}