So, this is a task from one very popular educational site in Russia: https://acmp.ru/index.asp?main=task&id_task=786&ins=1
Mathematically, you need to find the power of two not exceeding the given number, read from the standard input stream, and output their difference in the standard output stream. My python3 solution takes 41 characters, but the leader’s solution is only 40 characters. Who can shorten the code?
Newlines, spaces and tabs are not included while counting code length.
x = int(input()) print(x - 2 ** (len(bin(x)) - 3))