#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<map>
#include<vector>
#include<queue>
#include<functional>
#include<cstring>
#include<cstdlib>
#include<complex>
using namespace std;
typedef long long ll;
typedef complex < double > Point;
/*
    Pointの使い方
    Point AにおけるX座標...real(A) or A.real()
                   Y座標...imag(A) or A.imag() 状況によってちょいちょい使い分けとか

    Point A,BにおいてA+B,A-B,(double)k * Aは定義済み
    原点からの距離はsqrt(norm(A))
    二点間の距離はsqrt(norm(A-B))
    norm(A)はX^2+Y^2を返す
*/
typedef vector < Point > Polygon;
namespace std {
    bool operator < (Point a,Point b) {
        //ここで座標の比較における"大きい"を定義
        return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
    }
}
const double EPS = 1e-8;
const double INF = 1e12;



struct Line : Polygon{
    Line(Point p,Point q){ push_back(p);push_back(q); }
};
struct Circle{
    Point p;
    double r;
    Circle(Point a, double s){ p = a;r = s; }
};

double cross(Point p,Point q){
    return imag(conj(p)*q);
}

double dot(Point p,Point q){
    return real(conj(p)*q);
}

int ccw(Point a,Point b,Point c){
    b-=a,c-=a;
    if(cross(b,c)>0)return 1; //反時計回り
    if(cross(b,c)<0)return -1; //時計回り
    if(dot(b,c)<0)return 2; //直線上に c - a - b
    if(norm(b)<norm(c))return -2; // 直線上に a - b - c
    return 0; // 直線上に a - c - b
}

Point normalize(Point P, double l){
    double a = real(P), b = imag(P);
    double y = sqrt(b*b/(a*a+b*b)*l*l);
    double x = (a/b)*y;

    return Point(x,y);
}

double heron(Point A, Point B, Point C){
    double a = sqrt(norm(A-B));
    double b = sqrt(norm(B-C));
    double c = sqrt(norm(C-A));
    double s = (a+b+c)/2;

    return sqrt(s*(s-a)*(s-b)*(s-c));
}
bool intersectLL(Line l, Line m) {
    return abs(cross(l[1]-l[0], m[1]-m[0])) > EPS || // 平行でない
         abs(cross(l[1]-l[0], m[0]-l[0])) < EPS;   // 同一の線
}
bool intersectLS(Line l, Line s) {
    return cross(l[1]-l[0], s[0]-l[0])*       // s[0] が lの左
           cross(l[1]-l[0], s[1]-l[0]) < EPS; // s[1] が lの右
}
bool intersectLP(Line l, Point p) {
    return abs(cross(l[1]-p, l[0]-p)) < EPS;
}
bool intersectSS(Line s, Line t) {
    return ccw(s[0],s[1],t[0])*ccw(s[0],s[1],t[1]) <= 0 &&
         ccw(t[0],t[1],s[0])*ccw(t[0],t[1],s[1]) <= 0;
}
bool intersectSP(Line s, Point p) {
    return abs(s[0]-p)+abs(s[1]-p)-abs(s[1]-s[0]) < EPS; // triangle inequality
}
//↓2円の交点二つを返す（ポインタ）,戻り値は交点の個数
int intersectCC(Circle A, Circle B, Point *p, Point *q){

    Point P,Q;
    if(B.p<A.p)swap(A.p,B.p);
    Point dv = B.p - A.p;//ベクトル


    double L = sqrt(norm(dv));
    int num;
    //距離がLの場合
    if( L==(A.r + B.r) ){
        num = 1;
        //交点1つ
        //虚数軸に沿って並んでいるとバグる？
        dv = normalize(dv,A.r);
        P = Q = Point(real(dv)+real(A.p),imag(dv)+imag(A.p));
    }
    else if( L<(A.r + B.r) && L > fabs(A.r - B.r) ){
        num = 2;
        //交点2つ
        /*
        交点の一方Qからベクトルdvに垂線を下ろしたところをptとする
        ふたつの直角三角形p0-pt-Q、p1-pt-Qができる
        p0-pt間の長さをtとすると、これらの三角形のQ-ptの長さは等しいため、

        r0*r0 - t*t = r1*r1 - (L-t)*(L-t)
        r0*r0 - t*t = r1*r1 - L*L - t*t + 2*L*t
        t = (r0*r0 - r1*r1 + L*L)/(2*L)

        tから、p0-Qベクトルとdvベクトルとの角度aを求め、
        dvベクトルから、+a,-aの座標を求めれば交点となる
        */

        //tを求める
        double t = 0.5*( A.r*A.r - B.r*B.r + L*L)/L;

        //p0-Qベクトルとdvベクトルの角度
        double a = acos( t/A.r );

        //dvベクトルの角度
        double a0 = atan2( imag(dv), real(dv) );

        //交点
        P = Point( real(A.p) + A.r*cos(a0+a), imag(A.p) + A.r*sin(a0+a) );
        Q = Point( real(A.p) + A.r*cos(a0-a), imag(A.p) + A.r*sin(a0-a) );

    }
    else{
        num = 0;
        //交点なし
    }

    *p = P;
    *q = Q;

    return num;
}
Point projection(Line l, Point p) {//射影
    double t = dot(p-l[0], l[0]-l[1]) / norm(l[0]-l[1]);
    return l[0] + t * (l[0]-l[1]);
}
Point reflection(Line l, Point p) {//反射
    return p + (projection(l, p) - p) + (projection(l, p) - p);
}
double distanceLP(Line l, Point p) {
    return abs(p - projection(l, p));
}
double distanceLL(Line l, Line m) {
    return intersectLL(l, m) ? 0 : distanceLP(l, m[0]);
}
double distanceLS(Line l, Line s) {
    if (intersectLS(l, s)) return 0;
    return min(distanceLP(l, s[0]), distanceLP(l, s[1]));
}
double distanceSP(Line s, Point p) {
    const Point r = projection(s, p);
    if (intersectSP(s, r)) return abs(r - p);
    return min(abs(s[0] - p), abs(s[1] - p));
}
double distanceSS(Line s, Line t) {
    if (intersectSS(s, t)) return 0;
    return min(min(distanceSP(s, t[0]), distanceSP(s, t[1])),
             min(distanceSP(t, s[0]), distanceSP(t, s[1])));
}
Point crosspoint(Line l, Line m) {
    double A = cross(l[1] - l[0], m[1] - m[0]);
    double B = cross(l[1] - l[0], l[1] - m[0]);
    if (abs(A) < EPS && abs(B) < EPS) return m[0]; // same line
    if (abs(A) < EPS);
    return m[0] + B / A * (m[1] - m[0]);
}
/*
double area(Polygon P) {//多角形の面積
    double A = 0;
    for (int i = 0; i < P.size(); ++i)
        A += cross(curr(P, i), next(P, i));
    return A;
}
*/
Polygon convex_hull(Polygon ps) {//凸包
    int n = ps.size(), k = 0;
    sort(ps.begin(), ps.end());
    Polygon ch(2*n);
    for (int i = 0; i < n; ch[k++] = ps[i++]) // lower-hull
        while (k >= 2 && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
    for (int i = n-2, t = k+1; i >= 0; ch[k++] = ps[i--]) // upper-hull
        while (k >= t && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
    ch.resize(k-1);
    return ch;
}
int main(){
    int n;
    while(cin>>n,n){
        Polygon G;
        for(int i = 0;i < n;i++){
            Point p;
            scanf("%lf,%lf",&real(p),&imag(p));
            G.push_back(p);
        }
       Polygon H = convex_hull(G);
       cout<<G.size()-H.size()<<endl;

    }
    return 0;
}

Measured memory_bytes: 1300