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

namespace ConsoleApplication1
{
    class Program
    {
        static readonly double EPS = 1E-10;

        static void Main(string[] args)
        {
            StringBuilder sb = new StringBuilder();

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

                if (n == 0) break;

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

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

                List<Point> selected = AndrewScan(s);

                int ans = n - selected.Count;

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

        static List<Point> AndrewScan(List<Point> s)
        {
            int n = s.Count;

            if (n < 3) return s;

            s.Sort();

            List<Point> u = new List<Point>();
            u.Add(s[0]);
            u.Add(s[1]);

            List<Point> l = new List<Point>();
            l.Add(s[n - 1]);
            l.Add(s[n - 2]);

            for (int i = 2; i < n; i++)
            {
                for (int j = u.Count; j >= 2 && (u[j - 1] - u[j - 2]).Cross(s[i] - u[j - 2]) > EPS; j--)
                {
                    u.RemoveAt(u.Count - 1);
                }
                u.Add(s[i]);
            }

            for (int i = s.Count - 3; i >= 0; i--)
            {
                for (int j = l.Count; j >= 2 && (l[j - 1] - l[j - 2]).Cross(s[i] - l[j - 2]) > EPS; j--)
                {
                    l.RemoveAt(l.Count - 1);
                }
                l.Add(s[i]);
            }

            l.Reverse();
            for (int i = u.Count - 2; i >= 1; i--) l.Add(u[i]);

            return l;
        }
    }

    class Point : IComparable
    {
        static readonly double EPS = 1E-10;

        internal double x, y;

        public Point() { }

        public Point(double x, double y)
        {
            this.x = x;
            this.y = y;
        }

        public double Abs { get { return Math.Sqrt(Norm); } }
        public double Norm { get { return x * x + y * y; } }

        public double Dot(Point p) { return x * p.x + y * p.y; }
        public double Cross(Point p) { return x * p.y - y * p.x; }

        public static Point operator +(Point a, Point b) { return new Point(a.x + b.x, a.y + b.y); }
        public static Point operator -(Point a, Point b) { return new Point(a.x - b.x, a.y - b.y); }
        public static Point operator *(Point p, double d) { return new Point(p.x * d, p.y * d); }
        public static Point operator /(Point p, double d) { return new Point(p.x / d, p.y / d); }
        public static bool operator <(Point a, Point b) { return Math.Abs(a.x - b.x) > EPS ? a.x < b.x : a.y < b.y; }
        public static bool operator >(Point a, Point b) { return Math.Abs(a.x - b.x) > EPS ? a.x > b.x : a.y > b.y; }
        public static bool operator ==(Point a, Point b) { return Math.Abs(a.x - b.x) < EPS && Math.Abs(a.y - b.y) < EPS; }
        public static bool operator !=(Point a, Point b) { return Math.Abs(a.x - b.x) >= EPS || Math.Abs(a.y - b.y) >= EPS; }

        public int CompareTo(object obj)
        {
            var other = obj as Point;
            if (obj == null) return -1;

            ComparerX compX = new ComparerX();
            return compX.Compare(this, other);
        }

        public override bool Equals(object obj)
        {
            Point other = obj as Point;
            return Math.Abs(x - other.x) < EPS && Math.Abs(y - other.y) < EPS;
        }

        public override int GetHashCode()
        {
            return x.GetHashCode() ^ y.GetHashCode();
        }

        public override string ToString()
        {
            return string.Format("{0} {1}", x, y);
        }
    }

    class ComparerX : IComparer<Point>
    {
        static readonly double EPS = 1E-10;

        public int Compare(Point a, Point b)
        {
            if (a.x - b.x < -EPS) return -1;
            if (a.x - b.x > EPS) return 1;
            if (a.y - b.y < -EPS) return -1;
            if (a.y - b.y > EPS) return 1;
            return 0;
        }
    }

    class ComparerY : IComparer<Point>
    {
        static readonly double EPS = 1E-10;

        public int Compare(Point a, Point b)
        {
            if (a.y - b.y < -EPS) return -1;
            if (a.y - b.y > EPS) return 1;
            if (a.x - b.x < -EPS) return -1;
            if (a.x - b.x > EPS) return 1;
            return 0;
        }
    }
}

Measured memory_bytes: 9360