Teju has been given the job to write the problem statement for the cakewalk problem of some random contest. Being a noob problem setter, he can't come up with anything. While he is busy thinking of something , help him solve the following problem.
You are given an array Arr of N integers. You can do the following in one operation on the array :
Your aim is to make all the elements of the array equal. Help him find the minimum number of operations needed.
INPUT
The first line of input contains 1 integer N , denoting the size of the array Arr.
The second line of the input contains N elements where ith element is Arr[i].
OUTPUT
Print the minimum number of operations required.
CONSTRAINTS
1 <=N<= 100
1 <= Arr[i] <= 100
Minimum 2 operations are required.
1) Remove 1 from index 4 of the array. So the array now looks like => 3 3 2 3
2) Remove 2 from index 3 of the new array. So the array now looks like => 3 3 3
All the elements are equal now.