josephus problem but a litle bit changed.