#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n;
  cin >> n;
  if (n == 1) {
    cout << "0";
  } else {
    std::vector<int> freq(n);
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      freq[x]++;
    }
    long int max = freq[1];
    for (int i = 1; i <= 3; i++) {
      if (freq[i] > max) {
        max = freq[i];
      }
    }
    cout << n - max;
  }
  return 0;
}
