#include<iostream> using namespace std; int main() { int n; cin>>n; int n1=0,n5=0,n10=0; for(int i=1;i<=n;i++) { int k; cin>>k; if(k==1) n1++; if(k==5) n5++; if(k==10) n10++; } cout<<n1<<endl<<n5<<endl<<n10<<endl; return 0; }