revise Josephus problem