#include<bits/stdc++.h> using namespace std; int c,d,e; int a[10]; int main() { int b; cin>>b; for(int i=1;i<=b;i++) { cin>>a[i]; if(a[i]==1)c++; else if(a[i]==5)d++; else if(a[i]==10)e++; } cout<<c<<endl<<d<<endl<<e; return 0; }
eee