local ffi = require 'ffi' local C = ffi.C ffi.cdef [[ long atol(const char *str); int printf(const char *fmt, ...); ]] C.printf("%ld\n", (function (f, s) return f(s) end)(function (s) local n = C.atol(s) return n/3LL*2LL + n/5LL*2LL end, io.stdin:read("*l")))