#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
#include <complex>

using namespace std;
typedef long long ll;

typedef long double R;
typedef complex<R> P;

const R EPS = 1e-10;
const R PI = acos(-1);
int sgn(R a) {
    if (a < -EPS) return -1;
    if (a > EPS) return 1;
    return 0;
}


bool near(P a, P b) {
    return !sgn(abs(a-b));
}

R cross(P a, P b) { return imag(conj(a)*b); }
R dot(P a, P b) { return real(conj(a)*b); }

struct L {
    P x, y;
    L() {};
    L(P x, P y) :x(x), y(y) {};
};

namespace std {
    bool operator < (P a, P b) {
        return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
    }
}

int ccw(P a, P b, P c) {
    double cr = cross(b-a, c-a);
    if (cr > EPS) return 1;
    if (cr < -EPS) return -1;
    if (dot(b-a, c-a) < -EPS) return 2;
    if (dot(a-b, c-b) < -EPS) return -2;
    return 0;
}

typedef vector<P> Pol;

Pol convex(Pol p) {
    sort(p.begin(), p.end());
    if (p.size() <= 2) return p;
    Pol up;
    for (P d: p) {
        //if (up.size() > 1) printf("ccw%d\n",  ccw(up[up.size()-2], up[up.size()-1], d) );
        while (up.size() > 1 && ccw(up[up.size()-2], up[up.size()-1], d) > 0) {
        //    printf("pop\n");
            up.pop_back();
        }
        //printf("push\n");
        up.push_back(d);
    }
    reverse(up.begin(), up.end());
    Pol down;
    for (P d: p) {
        while (down.size() > 1 && ccw(down[down.size()-2], down[down.size()-1], d) < 0) down.pop_back();
        down.push_back(d);
    }
    //printf("%ld %ld\n", up.size(), down.size());
    down.insert(down.begin(), up.begin()+1, up.end()-1);
    return down;
}

int main() {
    while (true) {
        int n;
        cin >> n;
        if (!n) break;
        Pol p;
        for (int i = 0; i < n; i++) {
            R x, y;
            scanf("%Lf,%Lf", &x, &y);
            p.push_back(P(x, y));
        }
        cout << n-convex(p).size() << endl;
    }
    return 0;
}