#include <bits/stdc++.h>   using namespace std;   template <class T>   void pv(T a, T b) {     for (T i = a; i != b; ++i) cout << *i <<    ;     cout << endl;   }   int main() {     int N;     scanf( %d , &N);     int cnt[3] = {};     for (int i = 0; i < (int)(N); ++i) {       int a;       scanf( %d , &a);       ++cnt[a - 1];     }     cout << (N - *max_element(cnt, cnt + 3)) << endl;     return 0;   }   