To count a decimal number sequence from 0 to 512, we wish to design a counter. For this counter the number of flip-flops required are