#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

typedef long long ll;
using namespace std;

#define mod 1000000007
#define INF 1000000000
#define LLINF 2000000000000000000LL

#define SIZE 100000

struct P{
    typedef double Type;
    
    Type x,y;
    
    P(Type X,Type Y){
        x = X;
        y = Y;
    }
    
    bool operator< (const P &B) const{
        return x==B.x ? y < B.y : x < B.x;
    }
};

/* ConvexHull(??????) */

bool ccw(P &base,P &A,P &B){
    //??´???????????????????????????
    return (A.x-base.x)*(B.y-base.y) - (A.y-base.y)*(B.x-base.x) >= 0; //double?????? -EPS
    
    //??´?????????????????????
    //return (A.x-base.x)*(B.y-base.y) - (A.y-base.y)*(B.x-base.x) > 0; //double?????? EPS
}

vector<P> ConvexHull(vector<P> s){
    vector<P> g;
    int n = (int)s.size();
    
    if(n<3) return s;
    
    sort(s.begin(),s.end());
    
    for(int i=0;i<n;i++){
        for(int m = (int)g.size();m>=2 && ccw(g[m-2],g[m-1],s[i]); m--){
            g.pop_back();
        }
        g.push_back(s[i]);
    }
    
    int upper_n = g.size();
    
    for(int i=n-2;i>=0;i--){
        for(int m = (int)g.size();m>upper_n && ccw(g[m-2],g[m-1],s[i]); m--){
            g.pop_back();
        }
        g.push_back(s[i]);
    }
    
    reverse(g.begin(),g.end());
    g.pop_back();
    
    return g;
}

int calc(int n){
    //int n;
    double x,y;
    vector<P> point;
    vector<P> ans;
    
    //scanf("%d",&n);
    
    for(int i=0;i<n;i++){
        scanf("%lf,%lf",&x,&y);
        point.push_back(P(x,y));
    }
    
    ans = ConvexHull(point);
    int m = (int)ans.size();
    
    
    printf("%d\n",n-m);
    
    return 0;
}

int main(){
    int n;
    
    while(1){
        scanf("%d",&n);
        if(n==0) break;
        calc(n);
    }
}