Little Chef and Numbers - conditional counting loops