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