import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); double s=0.0,sum=0.0; for(int i=1;i<=n;i++) { s=1.0/i; sum=sum+s; } System.out.printf("%.6f",sum); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); double s=0.0,sum=0.0; for(int i=1;i<=n;i++) { s=1.0/i; sum=sum+s; } System.out.printf("%.6f",sum); } }