As a child, did you ever play the game " One potato, two potato,..." to determine who would be "it"?
A child is pointed to during each phrase. There are four phrases each in lines 1 and 2 and seven phrases in line 3, so the last child pointed to is the 15th one. If there are fewer than 15 children, you go around the circle again. The child pointed to when the word go is said is "out." The game begins again with the remaining children, starting again with the child following the last one out. The last child remaining is "it".
Simulate this game in a computer program. THe input is the number of children, the output is which child is "out:.