using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        struct Point
        {
            public double x;
            public double y;
        }

        static void Main()
        {
            StringBuilder sb = new StringBuilder();

            while (true)
            {
                int n = int.Parse(Console.ReadLine());

                if (n == 0) break;

                List<Point> pointList = new List<Point>();

                for (int i = 0; i < n; i++)
                {
                    double[] input = Array.ConvertAll(Console.ReadLine().Split(','), double.Parse);

                    Point inputP;
                    inputP.x = input[0];
                    inputP.y = input[1];
                    pointList.Add(inputP);
                }

                pointList = pointList.OrderBy(p => p.x).ThenBy(p => p.y).ToList();

                List<Point> selectList = new List<Point>();

                Point startP;
                startP.x = pointList[0].x;
                startP.y = pointList[0].y;

                Point nextP = new Point();

                double minRd = 1.0;

                for (int i = 1; i < pointList.Count; i++)
                {
                    double r = Math.Atan2((pointList[i].y - startP.y), (pointList[i].x - startP.x));

                    if (r < minRd)
                    {
                        nextP.x = pointList[i].x;
                        nextP.y = pointList[i].y;
                        minRd = r;
                    }
                }

                selectList.Add(nextP);

                Point target = new Point();

                do
                {
                    double maxRd = 0.0;

                    for (int i = 0; i < pointList.Count; i++)
                    {
                        if (pointList[i].x != startP.x || pointList[i].y != startP.y ||
                            pointList[i].x != nextP.x || pointList[i].y != nextP.y)
                        {
                            double rd = CalcAngle(startP, nextP, pointList[i]);

                            if (rd > maxRd)
                            {
                                maxRd = rd;

                                target.x = pointList[i].x;
                                target.y = pointList[i].y;
                            }
                        }
                    }

                    startP.x = nextP.x;
                    startP.y = nextP.y;
                    nextP.x = target.x;
                    nextP.y = target.y;

                    selectList.Add(target);

                } while (target.x != pointList[0].x || target.y != pointList[0].y);

                int ans = pointList.Count - selectList.Count;

                sb.AppendLine(ans.ToString());
            }
            Console.Write(sb);
        }

        static double CalcAngle(Point a, Point b, Point c)
        {
            double baX = a.x - b.x;
            double baY = a.y - b.y;
            double bcX = c.x - b.x;
            double bcY = c.y - b.y;

            double babc = baX * bcX + baY * bcY;
            double ban = baX * baX + baY * baY;
            double bcn = bcX * bcX + bcY * bcY;

            double rd = Math.Acos(babc / Math.Sqrt(ban * bcn));

            return rd;
        }
    }
}

Measured memory_bytes: 10544