/* package whatever; // don't place package name! */
//Write Brute Force solution for FInding the number with highest frequency in an array
import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		int arr[] = {1,1,2,3,2,2,3,3,5,6,5,6,6,1,1};
		int n = arr.length;
		int maxFreq=0;
		for(int i = 0;i<n;i++){
		   int count = 0;
		   for(int j =0;j<n;j++){
		   	if(arr[i] == arr[j]){
		   		count++;
		   	}
		   }
		   if(maxFreq < count){
		    maxFreq = count;
		   }
		}
		int result = n - maxFreq;
		System.out.println("Minimum deletions required: " + result);
	}
}