import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
double sum = 0;
// for(int i = 1; i <= n; i++) {
// sum += 1.0 / (Math.pow(-1, i - 1) * (2 * i - 1));
// } // 测试不通过
for(int i = 1; i <= n; i++) {
if(i % 2 == 1) {
sum += 1.0 / i;
} else {
sum -= 1.0 / i;
}
}
System.out.printf("%.3f", sum);
}
}