#include <bits/stdc++.h>
using namespace std;
int b[4], c, n, l = 0, a, i;
int main() {
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a);
    b[a]++;
  }
  cout << n - max(b[1], max(b[2], b[3])) << endl;
  return 0;
}
