n=input("n = ");
S=0;p1=1;
for k=2:n
    p1=p1-1/k^2;
    S=S+1/k;
end;
S=S+p1;
disp(S);