#include using namespace std; double trigamma(double x) { double p; int i; x += 7; p = 1 / (x * x); p = (((((0.075757575757576 * p - 0.033333333333333) * p + 0.0238095238095238) * p - 0.033333333333333) * p + 0.166666666666667) * p + 1) / x + 0.5 * p; for(int i = 0; i < 6; i++) { x = x - 1; p = 1 / (x * x) + p; } return (p); } int main() { double x; cin >> x; cout << fixed << setprecision(15) << trigamma(x) << endl; }