import std.algorithm, std.array, std.container, std.range; import std.string, std.conv, std.math, std.random; import std.stdio, std.typecons; const mod = 1000007; void main() { auto n = readln.chomp.to!long; auto k = n / 2; writeln((((k + 1) % mod) * ((n - k + 1) % mod) - 1) % mod); }