josephus problem, second try