https://gyunseo.com/posts/josephus-problem-algorithm/