local ffi = require("ffi") local C = ffi.C ffi.cdef[[ long long atoll(const char*); ]] local function lltonumber(str) return C.atoll(str) end a = lltonumber(io.read()) % 1000000007LL a = tostring(a):gsub("LL", "") print(a)