Please Help me where i am wrong

Problem Link
(Problem - C - Codeforces)
My Sol.

#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false);cin.tie(0);
#define lli long long int
#define vi vector<lli>
#define pb push_back
#include<string>
#define mod 1000000007
//#define mp map<char,char>
#define mp map<lli,lli>
#define mpp map<string,string>
#define test lli t;cin>>t;while(t--)
using namespace std;
int main()
{
    lli n;
    cin>>n;
    vi arr(n);
    for(auto &it:arr)
        cin>>it;
    mp a;
    a[4]=0,a[8]=0,a[15]=0,a[16]=0,a[23]=0,a[42]=0;
    for(lli i=0;i<n;i++)
        a[arr[i]]+=1;
    lli val=INT_MAX,sum=0;
    for(auto x:a)
        val=min(val,x.second);
    for(auto x:a)
    {
        if(x.second>val)
            sum+=(x.second-val);
    }
    cout<<sum<<endl;
}

above code is given wrong answer.

You can checkout my solution here