local ffi = require("ffi") local C = ffi.C ffi.cdef[[ long long atoll(const char*); ]] local function lltonumber(str) return C.atoll(str) end local n = lltonumber(io.read()) local ret = 0LL local mul = 1LL while 0LL < n do if n % 2LL == 1LL then ret = mul end mul = mul * 2LL n = n / 2LL end ret = tostring(ret):gsub("LL", "") print(ret)