import std.algorithm, std.conv, std.range, std.stdio, std.string; import std.bigint; // BigInt void main() { auto l = readln.chomp.to!int; auto ai = new BigInt[](max(3, l+1)); auto si = new BigInt[](max(3, l+1)); ai[1] = ai[2] = si[1] = si[2] = 1; foreach (i; 3..l+1) { ai[i] = si[i-1] + i % 2; si[i] = si[i-2] + ai[i]; } auto r = ai[l]; if (l % 2 == 0) r -= ai[l/2] ^^ 2; writeln(l); writeln(r); }