Moore fine state machine that detects input sequence 111. Upper flip flop is a bit 1 of the state register, bottom is bit zero.
States are 00, 01, 10 and 11. State 00 means idle - didn't see any ones. 01 - saw one. 10 - saw two. 11 - saw three or more.