n=int(input())m=0for i in range(1,n+1): m +=1/iprint(m)
2
1.5
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!