#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, aux;
  cin >> n;
  vector<int> a(3, 0);
  for (int i = 0; i < n; i++) {
    cin >> aux;
    a[aux - 1]++;
  }
  sort(a.begin(), a.end());
  cout << a[0] + a[1] << endl;
  return 0;
}
