#include <bits/stdc++.h>
using namespace std;
int ar[5];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int ans = n, mx = 0;
  while (n--) {
    int a;
    cin >> a;
    ar[a]++;
  }
  for (int i = 1; i <= 3; i++) mx = max(mx, ar[i]);
  cout << ans - mx << endl;
}
