简单模拟
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,k,y;
int ans=0;
scanf("%d%d",&n,&k);
for(int i=1;i<=n;i++)
{
scanf("%d",&y);
if(5-y>=k)
ans++;
}
printf("%d\n",ans/3);
return 0;
}