A sequence detector has to be designed to detect a sequence with at most 3 runs of consecutive zeros of length 3.

001000010001000 This sequence has exactly 2 such runs

If we implement a sequential circuit with J-K flip flops then minimum number of flip flops required is ----?