#include <bits/stdc++.h>
using namespace std;
int n;
int a[3];
const int N = 1e6 + 5;
int main() {
  int x;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a[x]++;
  }
  int m = 0;
  for (int j = 1; j <= 3; j++) m = max(m, a[j]);
  cout << n - m << endl;
  return 0;
}
