import std.conv; import std.mathspecial; import std.stdio; import std.string; const real H = 1e-6; template sevenPointDiff(alias f){ T sevenPointDiff(T)(T x, T h=H){ T res; res = f(x + 3 * h) / 60 - 3 * f(x + 2 * h) / 20; res += 3 * f(x + h) / 4 - 3 * f (x - h) / 4; res += 3 * f(x - 2 * h) / 20 - f(x - 3 * h) / 60; res /= h; return res; } } void main(){ auto x = readln.chomp.to!real; writefln("%.12f", sevenPointDiff!(digamma)(x + 1)); }