#include <bits/stdc++.h>
int num[5];
int main() {
  int n, i, Num, max;
  scanf("%d", &n);
  num[1] = num[2] = num[3] = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &Num);
    num[Num]++;
  }
  max = num[1];
  if (num[2] > max) max = num[2];
  if (num[3] > max) max = num[3];
  printf("%d\n", n - max);
  return 0;
}
