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