#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s[4];
  memset(s, 0, sizeof(s));
  cin >> n;
  for (int x, i = 1; i <= n; i++) {
    cin >> x;
    s[x]++;
  }
  cout << n - max(s[1], max(s[2], s[3]));
}
