import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;

alias real F;
F cross(F[2] a, F[2] b){ return a[0]*b[1]-b[0]*a[1]; }
F[2] sub(F[] a, F[] b){ return [a[0]-b[0],a[1]-b[1]]; }

int solve(immutable int n)
{
    auto ps = iota(n).map!(_=>readln().chomp().split(",").map!(to!F).array()).array();
    if(ps.length<=3) return 0;
    ps.sort;
    auto u=[ps[0]],b=u;
    foreach(p;ps[1..$])
    {
        foreach_reverse(i;1..u.length) if(cross(sub(u[i-1],p),sub(u[i],p))<0) u.popBack();
        u~=p;
        foreach_reverse(i;1..b.length) if(cross(sub(b[i-1],p),sub(b[i],p))>0) b.popBack();
        b~=p;
    }
    return cast(int)(n-(u~b).sort().uniq().array().length);
}

void main()
{
    for(int n; 0!=(n=readln().chomp().to!int()); )
        writeln(solve(n));
}