#982. Josephus problem (k=4)
n people stand in a circle (1..n). Counting from 1, every 4-th person leaves. Find the number of the last person left.
### Input
One integer n (1 ≤ n ≤ 1000).
### Output
A number.
Examples
Input
649
Output
529
Input
730
Output
163
💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.