print(int(input())&0x3FE)