import java.util.Scanner; class no29{ public static void main(String[] args) { Scanner stdIn=new Scanner(System.in); int n=stdIn.nextInt(),i,j,t,a[]=new int[10],s=0; for(i=0;i1) { a[i]-=2; s++; } } t=0; for(i=0;i<10;i++) t+=a[i]; s+=t/4; System.out.print(s); } }