#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<Point> upper;
      upper.push_back(P[0]);
      upper.push_back(P[1]);
      for(int i = 2; i < n; i++) {
	while(upper.size() != 1 &&
	      cross(Vector(upper.rbegin()->x - (upper.rbegin()+1)->x,
			   upper.rbegin()->y - (upper.rbegin()+1)->y ),
		    Vector(P[i].x-upper.rbegin()->x,
			   P[i].y-upper.rbegin()->y)                   ) > 0) {
	  upper.pop_back();
	}
	upper.push_back(P[i]);
      }

      vector<Point> lower;
      lower.push_back(P[n-1]);
      lower.push_back(P[n-2]);
      for(int i = n-3; i >= 0; i--) {
	while(lower.size() != 1 &&
	      cross(Vector(lower.rbegin()->x - (lower.rbegin()+1)->x,
			   lower.rbegin()->y - (lower.rbegin()+1)->y ),
		    Vector(P[i].x-lower.rbegin()->x,
			   P[i].y-lower.rbegin()->y)                   ) > 0) {
	  lower.pop_back();
	}
	lower.push_back(P[i]);
      }
      ans = n - (int)(upper.size() + lower.size() - 2);
    }

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