josephus problem, first try