Count Houses in a Circular Street II
You walk a ring of houses knowing only an upper bound k on their number. You can step right, read the door in front of you and shut it, and at least one door starts open. Work out exactly how many houses there are.