a=int(input())
s=0
d=1
e=0
if a%2==0:
    e=int(a/2)
else:
    e=int(a/2+0.5)
for i in range(1,e+1):
    if i%2==0:
        s-=1/d
    else:
        s+=1/d
    d+=2
print(round(s,8))


count=1
sum=0
for i in range(1,a+1,2):
    if count%2:
        sum+=1/i
    else:
        sum-=1/i
    count+=1
print(round(sum,8))
    
