#include <bits/stdc++.h>
#define SIZE 300005
#define MOD 1000000007LL
#define INF 1 << 30
#define LLINF 1LL << 60
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define DOWN(i,b,a) for(int i=b;i>=a;i--)
#define SET(a,c) memset(a,c,sizeof a)
#define FORALL(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define FOREACH(i,c) for(auto (i) : (c))
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique((o).begin(),(o).end()), (o).end())
#define SQ(x) ((x)*(x))
using namespace std;
typedef long long ll;
typedef valarray<int> Array;
typedef pair<ll,ll> Pll;
typedef pair<int, int> Pii;
typedef pair<double, double> Pdd;
template<typename T> inline void priv(vector<T>a){REP(i,a.size()){cout<<a[i]<<((i==a.size()-1)?"\n":" ");}}
ll gcd(ll a,ll b){int c=max(a,b);int d=min(a,b);return c==0||d==0?c:gcd(c%d,d);}
ll lcm(ll a,ll b){return a==0||b==0?0:a*b/gcd(a,b);}

class P
{
private:
  double add(double a,double b){if(abs(a+b)<1e-10*(abs(a)+abs(b)))return 0;else return a+b;}
public:
  double x,y;
  P(){};P(double x,double y):x(x),y(y){};
  P operator+(const P&q){return P(add(x,q.x),add(y,q.y));}
  P operator+=(const P&q){x+=q.x;y+=q.y;return *this;}
  P operator-(const P&q){return P(add(x,-q.x),add(y,-q.y));}
  P operator-=(const P&q){x-=q.x;y-=q.y;return *this;}
  template<typename T> P operator*(T d){return P(x*d,y*d);}
  template<typename T> P operator*=(T d){x*=d;y*=d;return *this;}
  bool operator<(const P&q){return (x!=q.x)?(x<q.x):(y<q.y);}
  bool operator>(const P&q){return (x!=q.x)?(x>q.x):(y>q.y);}
  bool operator<=(const P&q){return (x!=q.x)?(x<=q.x):(y<=q.y);}
  bool operator>=(const P&q){return (x!=q.x)?(x>=q.x):(y>=q.y);}
  static bool comp(const P&p,const P&q){return (p.x!=q.x)?(p.x<q.x):(p.y<q.y);}
  double dot(const P&q){return x*q.x+y*q.y;}
  double det(const P&q){return x*q.y-y*q.x;}
  bool on_seg(P p1,P p2,P q){return (p1-q).det(p2-q)==0&&(p1-q).dot(p2-q)<=0;}
  P intersection(P p1,P p2,P q1,P q2){return p1+(p2-p1)*((q2-q1).det(q1-p1)/(q2-q1).det(p2-p1));}
};

vector<P> convex_hull(vector<P> ps)
{
  sort(ps.begin(),ps.end(),P::comp);
  int k = 0, n = ps.size();
  vector<P> qs(n*2);
  for(int i=0;i<n;i++)
  {
    while(k>1&&(qs[k-1]-qs[k-2]).det(ps[i]-qs[k-1])<=0)k--;
    qs[k++]=ps[i];
  }
  for(int i=n-2,t=k;i>=0;i--)
  {
    while(k>t&&(qs[k-1]-qs[k-2]).det(ps[i]-qs[k-1])<=0)k--;
    qs[k++]=ps[i];
  }
  qs.resize(k-1);
  return qs;
}

int main()
{
  int n;
  while(cin >> n, n)
  {
    vector<P> ps,qs;
    REP(i,n){P t;scanf("%lf,%lf\n",&t.x,&t.y);ps.push_back(t);}
    qs = convex_hull(ps);
    cout << n-qs.size() << endl;
  }
  return 0;
}