#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i)) #define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; typedef vector vi; typedef pair pii; typedef vector > vpii; typedef long long ll; template static void amin(T &x, U y) { if(y < x) x = y; } template static void amax(T &x, U y) { if(x < y) x = y; } int main() { double x; while(~scanf("%lf", &x)) { //PolyGamma[1,1+x] auto polygamma_1 = [](double x) { const int K = 50; const double coeffs[K + 1] = { 1.6449340668482146681, -2.4041138063185761718, 3.246969701117774419, -4.147711020312174061, 5.086715306710188411, -6.050095633314071025, 7.028541249302254992, -8.016065526879961479, 9.008942006185984086, -10.004896569681596, 11.00250956854761716, -12.00070732746758358, 12.9981342063054163, -13.99206239306592106, 14.97633983302635615, -15.93782270469998779, 16.8510323939057687, -17.67168374767435881, 18.33127302498742281, -18.73653878024439616, 18.77811503500766297, -18.35075522507402258, 17.38276117212563587, -15.8662970442640601, 13.87645080497570576, -11.56849174048032319, 9.15041672705758742, -6.83837942153813288, 4.81037159407223056, -3.174128543836691298, 1.958379681069062035, -1.126307539833646026, 0.601976101366390352, -0.298065000605006801, 0.1362801355590084179, -0.05733456213833759648, 0.02210972594757063743, -0.00778128763075514072, 0.002487006287830406237, -0.0007177583233071391231, 0.0001857970744734773324, -0.00004279316712579212362, 8.684541747026690099e-6, -1.534238234623818611e-6, 2.323309946299035521e-7, -2.955092706178223107e-8, 3.070341316858696484e-9, -2.5024249357916062498e-10, 1.5003776010264562567e-11, -5.884182034692197727e-13, 1.1324274859070014118e-14 }; double sum = 0; double p = 1; for(int k = 0; k <= K; ++ k) { sum += coeffs[k] * p; p *= x; } return sum; }; int m = (int)floor(x); double z = x - m; double ans = polygamma_1(z); for(int i = 1; i <= m; ++ i) ans -= 1. / ((i + z) * (i + z)); printf("%.15f\n", (double)ans); } return 0; }