#include <bits/stdc++.h>
const double PI = acos(-1.0);
const int MAXN = 1000010;
int flg[4], n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    flg[x]++;
  }
  int max = std::max(flg[1], std::max(flg[2], flg[3]));
  printf("%d\n", n - max);
}
