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 min = 1LL local max = 1000000007LL while 1LL < max - min do local mid = (min + max) / 2LL if mid * mid <= n then min = mid else max = mid end end if min * min == n then local ret = tostring(min * 2LL - 1LL):gsub("LL", "") print(ret) else local ret = tostring(min * 2LL):gsub("LL", "") print(ret) end