import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); double sum=0.0; for(int i=1;i<=n;i++)//偶数为负,奇数为正 { if(i%2==0) { sum-=1.0/i; }else{ sum+=1.0/i; } } System.out.printf("%.3f",sum); } }