There is a given sequence of integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub>, where every number is from 1 to 3 inclusively. You have to replace the minimum number of numbers in it so that all the numbers in the sequence are equal to each other.
The first line contains an integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">6</sup>). The second line contains a sequence of integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 3).
n = int(input())
a = list(map(int, input().split()))

num_1 = 0
num_2 = 0
num_3 = 0

for _a in a:
    if _a == 1:
        num_1 += 1
    elif _a == 2:
        num_2 += 1
    elif _a == 3:
        num_3 += 1

ma = max(max(num_1, num_2), num_3)
print(len(a) - ma)
