using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using static System.Math;

namespace CSharpSpiral {
	class Program {
		static void Main(string[] args) {
			var sw = new StreamWriter(Console.OpenStandardOutput()) {
				AutoFlush =
#if DEBUG
			true
#else
			false
#endif
			};
			Console.SetOut(sw);
			new Program().Solve(new ConsoleInput(
#if DEBUG
			new StreamReader("../../../inputData.txt")
#else
			Console.In
#endif
			, ','));
			Console.Out.Flush();
		}
		public void Solve(ConsoleInput cin) {
			while(true) {
				var n = cin.ReadInt;
				if(n == 0) break;
				var Points = new Point[n];
				for(int i = 0; i < n; i++) {
					var datum = cin.ReadStrArray(2).Select(decimal.Parse).ToArray();
					Points[i] = new Point(datum[0], datum[1]);
				}
				var res = n - GrahamScan(Points).Count();
				Console.WriteLine(res);
			}
		}
		public struct Point: IComparable<Point> {
			public decimal x { get; set; }
			public decimal y { get; set; }
			public Point(decimal xx, decimal yy) { x = xx; y = yy; }
			public int CompareTo(Point q)
				=> x == q.x ? y.CompareTo(q.y) : x.CompareTo(q.x);
			public static Point operator -(Point p, Point q) => new Point(q.x - p.x, q.y - p.y);
			public static decimal outer(Point p, Point q) => p.x * q.y - p.y * q.x;
			public override string ToString() => $"({x}, {y})";
			//outer((0,1),(1,0))==-1
		}
		public class PointComparer: IComparer<Point> {
			public int Compare(Point p, Point q) => p.CompareTo(q);
		}
		public List<Point> GrahamScan(Point[] X) {
			var CO = new PointComparer();
			MergeSort(X, CO);
			var Down = new Stack<Point>();
			Down.Push(X[0]);
			Down.Push(X[1]);
			foreach(var p in X.Skip(2)) {
				while(true) {
					var v1 = Down.Pop();
					if(!Down.Any()) {
						Down.Push(v1);
						Down.Push(p);
						break;
					}
					var v0 = Down.Peek();
					if(Point.outer(v0 - v1, p - v1) > 0) continue;
					else {
						Down.Push(v1);
						Down.Push(p);
						break;
					}
				}
			}
			var Upper = new Stack<Point>();
			Upper.Push(X[X.Length - 1]);
			Upper.Push(X[X.Length - 2]);
			foreach(var p in X.Reverse().Skip(2)) {
				while(true) {
					var v1 = Upper.Pop();
					if(!Upper.Any()) {
						Upper.Push(v1);
						Upper.Push(p);
						break;
					}
					var v0 = Upper.Peek();
					if(Point.outer(v0 - v1, p - v1) > 0) continue;
					else {
						Upper.Push(v1);
						Upper.Push(p);
						break;
					}
				}
			}
			var Hull = Upper.Concat(Down.Skip(1).Take(Down.Count() - 2));
			return Hull.ToList();
		}
		public static void MergeSort<T>(T[] A, IComparer<T> comparer) where T : IComparable<T> {
			MergeSort1(0, A.Length, A, comparer);
		}
		private static void Merge<T>(int left, int mid, int right, T[] A, IComparer<T> comparer)
			where T : IComparable<T> {
			var nl = mid - left;
			var nr = right - mid;
			var L = new T[nl];
			var R = new T[nr];
			for(int i = 0; i < nl; i++)
				L[i] = A[i + left];
			for(int i = 0; i < nr; i++)
				R[i] = A[i + mid];
			int il = 0, ir = 0;
			for(int k = left; k < right; k++) {
				if(comparer.Compare(L[il], R[ir]) <= 0) {
					A[k] = L[il++];
					if(il == nl) {
						k++;
						for(; ir < nr;)
							A[k++] = R[ir++];
						break;
					}
				} else {
					A[k] = R[ir++];
					if(ir == nr) {
						k++;
						for(; il < nl;)
							A[k++] = L[il++];
						break;
					}
				}
			}
		}
		private static void MergeSort1<T>(int left, int right, T[] A, IComparer<T> comparer)
		where T : IComparable<T> {
			if(left + 1 < right) {
				var mid = (left + right) / 2;
				MergeSort1(left, mid, A, comparer);
				MergeSort1(mid, right, A, comparer);
				Merge(left, mid, right, A, comparer);
			}
		}
	}
	static class ExtendClass {
		public static string Join<T>(this IEnumerable<T> X, string separator = " ") => string.Join(separator, X);
		
	}
	class ConsoleInput {
		private readonly TextReader _stream;
		private readonly char _separator = ' ';
		private readonly Queue<string> inputStream;
		public ConsoleInput(TextReader stream, char separator = ' ') {
			this._separator = separator;
			this._stream = stream;
			inputStream = new Queue<string>();
		}
		public string Read {
			get {
				if(inputStream.Count != 0) return inputStream.Dequeue();
				string[] tmp = _stream.ReadLine().Split(_separator);
				for(int i = 0; i < tmp.Length; ++i)
					inputStream.Enqueue(tmp[i]);
				return inputStream.Dequeue();
			}
		}
		public string ReadLine { get { return _stream.ReadLine(); } }
		public int ReadInt { get { return int.Parse(Read); } }
		public long ReadLong { get { return long.Parse(Read); } }
		public double ReadDouble { get { return double.Parse(Read); } }
		public string[] ReadStrArray(long N) {
			var ret = new string[N];
			for(long i = 0; i < N; ++i)
				ret[i] = Read;
			return ret;
		}
		public int[] ReadIntArray(long N) { var ret = new int[N]; for(long i = 0; i < N; ++i) ret[i] = ReadInt; return ret; }
		public long[] ReadLongArray(long N) { var ret = new long[N]; for(long i = 0; i < N; ++i) ret[i] = ReadLong; return ret; }
		public double[] ReadDoubleArray(long N) { var ret = new double[N]; for(long i = 0; i < N; ++i) ret[i] = ReadDouble; return ret; }
		public bool isEOF {
			get { return _stream.Peek() == -1; }
		}
	}

}



Measured memory_bytes: 16852