import std.stdio; import std.string; import std.algorithm; import std.conv; //--------------------- void main(){ auto MOD = 1_000_007; auto N = readln.chomp.to!long; long sol1(long n){ auto upper = (n/2)%MOD; auto lower = (n - upper)%MOD; auto res = (lower) + ((lower)+1)*(upper); return res%MOD; } sol1(N).writeln; }