local ffi = require 'ffi' local C = ffi.C ffi.cdef 'int printf(const char *, ...);' C.printf("%lu\n", (function (n) local m = n/2ULL m = n%2==0 and (m+2)*m or (m+3)*m+1 return m%1000007 end)(io.stdin:read("*n")))