import sys read=sys.stdin.buffer.read readline=sys.stdin.buffer.readline readlines=sys.stdin.buffer.readlines n=int(readline()) ans=1 for x in range(2, n+1): ans+=2/x for a in range(1, x): for b in range(1, x): if a!=b: ans+=a*b/x/(x-1) print('{:.7f}'.format(ans))