#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef pair<int,int> pint;

#define DE 1
#define FI first
#define SE second
#define PB push_back
#define MP make_pair
#define ALL(s) (s).begin(),(s).end()
#define REP(i,n) for (int i = 0; i < (int)(n); ++i)
#define EACH(i,s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define COUT(x) cout<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<<endl

template<class T1, class T2> ostream& operator<<(ostream &s, pair<T1,T2> P){return s<<'<'<<P.first<<", "<<P.second<<'>';}
template<class T> ostream& operator<<(ostream &s, vector<T> P) {s<<"{ ";for(int i=0;i<P.size();++i){if(i>0)s<<", ";s<<P[i];}return s<<" }"<<endl;}
template<class T1, class T2> ostream& operator<<(ostream &s, map<T1,T2> P) {s<<"{ ";for(__typeof__(P.begin()) it=P.begin();it!=P.end();++it){if(it!=P.begin())s<<", ";s<<'<'<<it->first<<"->"<<it->second<<'>';}return s<<" }"<<endl;}



const double EPS = 1e-10;
const double PI = acos(-1.0);
double torad(int deg) {return (double)(deg) * PI / 180;}
double todeg(double ang) {return ang * 180 / PI;}

struct Point {
    double x, y;
    Point(double x = 0.0, double y = 0.0) : x(x), y(y) {}
    friend ostream& operator << (ostream &s, const Point &p) {return s << '(' << p.x << ", " << p.y << ')';}
};

Point operator + (Point p, Point q) {return Point(p.x + q.x, p.y + q.y);}
Point operator - (Point p, Point q) {return Point(p.x - q.x, p.y - q.y);}
Point operator * (Point p, double a) {return Point(p.x * a, p.y * a);}
Point operator * (double a, Point p) {return Point(a * p.x, a * p.y);}
Point operator * (Point p, Point q) {return Point(p.x * q.x - p.y * q.y, p.x * q.y + p.y * q.x);}
Point operator / (Point p, double a) {return Point(p.x / a, p.y / a);}
Point conj(Point p) {return Point(p.x, -p.y);}
Point rot(Point p, double ang) {return Point(cos(ang) * p.x - sin(ang) * p.y, sin(ang) * p.x + cos(ang) * p.y);}
Point rot90(Point p) {return Point(-p.y, p.x);}
double cross(Point p, Point q) {return p.x * q.y - p.y * q.x;}
double dot(Point p, Point q) {return p.x * q.x + p.y * q.y;}
double norm(Point p) {return dot(p, p);}
double abs(Point p) {return sqrt(dot(p, p));}
bool eq(Point p, Point q) {return abs(p - q) < EPS;}
double amp(Point p) {double res = atan2(p.y, p.x); if (res < 0) res += PI*2; return res;}
bool operator < (Point p, Point q) {return (abs(p.x - q.x) > EPS ? p.x < q.x : p.y < q.y);}
bool operator > (Point p, Point q) {return (abs(p.x - q.x) > EPS ? p.x > q.x : p.y > q.y);}
Point operator / (Point p, Point q) {return p * conj(q) / norm(q);}


// 粗
// 1：a-bから見てcは左側(反時計回り)、-1：a-bから見てcは右側(時計回り)、0：一直線上
//int ccw(Point a, Point b, Point c) {
//    if (cross(b-a, c-a) > EPS) return 1;
//    if (cross(b-a, c-a) < -EPS) return -1;
//    return 0;
//}

// 精
// 1：a-bから見てcは左側(反時計回り)、-1：a-bから見てcは右側(時計回り)、2：c-a-bの順に一直線上、-2：a-b-cの順に一直線上、0：a-c-bの順に一直線上
int ccw(Point a, Point b, Point c) {
    if (cross(b-a, c-a) > EPS) return 1;
    if (cross(b-a, c-a) < -EPS) return -1;
    if (dot(b-a, c-a) < 0) return 2;
    if (norm(b-a) < norm(c-a)) return -2;
    return 0;
}


vector<Point> convexhull(vector<Point> ps) {
    int n = ps.size();
    vector<Point> res(2*n);
    sort(ps.begin(), ps.end());
    int k = 0;
    for (int i = 0; i < n; res[k++] = ps[i++]) {
        while (k >= 2 && ccw(res[k-2], res[k-1], ps[i]) <= 0) --k;
    }
    for (int i = n-2, t = k+1; i >= 0; res[k++] = ps[i--]) {
        while (k >= t && ccw(res[k-2], res[k-1], ps[i]) <= 0) --k;
    }
    res.resize(k-1);
    return res;
}
    

int main() {
    int n;
    while (cin >> n) {
        if (n == 0) break;
        
        vector<Point> ps(n), ch;
        for (int i = 0; i < n; ++i) {
            double x, y;
            scanf("%lf,%lf", &x, &y);
            ps[i] = Point(x, y);
        }
        ch = convexhull(ps);
    
        cout << n - ch.size() << endl;
    }
    
    return 0;
}
