#include <iostream>
#include <cstdio>
//#include <cstdlib>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <queue>
//#include <stack>
//#include <limits>
#include <sstream>
//#include <functional>
#include <complex>

using namespace std;

#define len(array)  (sizeof (array) / sizeof *(array))
#define rep(i, s, e) for(int i = s;i < e;i++)
#define rrep(i, e, s) for(int i = e;s <= i;i--)
#define vrange(v) v.begin(), v.end()
#define vrrange(v) v.rbegin(), v.rend()
#define vsort(v) sort(vrange(v))
#define vrsort(v) sort(vrrange(v))
#define arange(a) a, a + len(a)
#define asort(a) sort(arange(a))
#define arsort(a, t) sort(arange(a), greater<t>())
#define afill(a, v) fill(arange(a), v)
#define afill2(a, v, t) fill((t *)a, (t *)(a + len(a)), v)
#define fmax(a, b) (a < b? b : a)
#define fmin(a, b) (a > b? b : a)
#define fabs(a) (a < 0? -a : a)
#define X real()
#define Y imag()
typedef unsigned int ui;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef complex<double> p;
const int INF = (int)1e9;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-10;
//const int dx[] = {1, -1, 0, 0, 1, -1, -1, 1};
//const int dy[] = {0, 0, 1, -1, -1, -1, 1, 1};
//const int weight[] = {0,1,10,100,1000,10000,100000,1000000,10000000};
//priority_queue< int, vector<int>, greater<int> > q;


//二次元座標(from 蟻本)
typedef struct _PT{
  double x, y;
  _PT() {}
  _PT(double x, double y) : x(x), y(y){
  }
  _PT operator + (_PT p){
	return _PT(x + p.x, y + p.y);
  }
  _PT operator - (_PT p){
	return _PT(x - p.x, y - p.y);
  }
  _PT operator * (double d){
	return _PT(d*x, d*y);
  }
  double dot(_PT p){ //pとの内積
	return x * p.x + y * p.y;
  }
  double det(_PT p){ //pとの外積
	return x * p.y - p.x * y;
  }
  double dist(_PT p){ //pとの距離の2乗
	return (x-p.x)*(x-p.x) + (y-p.y)*(y-p.y);
  }
  bool operator <(const struct _PT &e) const{
    return x == e.x? (y < e.y) : x < e.x;
  }
  bool operator >(const struct _PT &e) const{
    return x == e.x? (y > e.y) : x > e.x;
  }

} pt;

class Polygon{

private:

public:
  vector<pt> pts;
  int n;
  Polygon(){}

  Polygon(vector<pt> v){
	n = v.size();
	pts = v;
  }
  //凸包（蟻本ver）
  vector<pt> convex_hull(){
	vector<pt> qs(n * 2);
	int k = 0;
	vsort(pts);
	rep(i, 0, n){ //下側凸包の作成
	  while(k > 1 && (qs[k-1] - qs[k-2]).det(pts[i] - qs[k-1]) <= 0) k--;
	  qs[k++] = pts[i];
	}
	for(int i = n - 2, t = k; i >= 0; i--){ //上側凸包の作成
	  while(k > t && (qs[k-1] - qs[k-2]).det(pts[i] - qs[k-1]) <= 0)	k--;
	  qs[k++] = pts[i];
	}
	qs.resize(k-1);
	n = k-1;
	pts = qs;
	return qs;
  }

  //点が図形を構成する順番に並んでないと駄目
   double getArea(){
	double s = 0;
	rep(i, 0, n-1){
	  s += pts[i].det(pts[i+1]);
	}
	s += pts[n-1].det(pts[0]);
	return fabs(s) * 0.5;
   }

  //http://www004.upp.so-net.ne.jp/s_honma/urawaza/area2.htm
  double _getArea(){
	double s = 0;
	rep(i, 0, n-1){
	  s += (pts[i].x - pts[i+1].x) * (pts[i].y + pts[i+1].y);
	}
	s += (pts[n-1].x - pts[0].x) *( pts[n-1].y + pts[0].y);
	return fabs(s) * 0.5;
  }

  //http://imagingsolution.net/math/calc_n_point_area/
  //点が時計回りか反時計回りに並んでないと駄目
  double getArea2(){
	double s = 0;
	rep(i, 0, n-1){
	  s += pts[i].x * pts[i+1].y + pts[i+1].x * pts[i].y;
	}
	s += pts[n-1].x * pts[0].y + pts[0].x * pts[n-1].y;
	return fabs(s) * 0.5;
  }

};

//http://eternuement.blogspot.jp/2011/04/c-string-double-int.html
double s2f(string str){
  double rt;
  stringstream ss;
  ss << str;
  ss >> rt;
  return rt;
}
string f2s(double d){
  string rt;
  stringstream ss;
  ss << d;
  ss >> rt;
  return rt;
}

vector<string> split( string s, string c )
{
  vector<string> ret;
  for(int i = 0, n; i <= s.length(); i = n + 1 ){
	n = s.find_first_of( c, i );
	if( n == string::npos ) n = s.length();
	string tmp = s.substr( i, n-i );
	ret.push_back(tmp);
  }
  return ret;
}

void doIt(){
  int n;
  vector<pt> v;
  string s;
  vector<string> ss;
  Polygon pg;
  while(true){
	cin >> n;
	v.clear();
	if(!n) break;
	rep(i, 0, n){
	  cin >> s;
	  ss = split(s, ",");
	  v.push_back(pt(s2f(ss[0]), s2f(ss[1])));
	}
	pg = Polygon(v);
	pg.convex_hull();
	cout << n - pg.n << endl;
  }
}

int main() {
  doIt();
  return 0;
}

Measured memory_bytes: 1288