import java.util.Scanner;
public class Test {
public static void main(String[] args) {
System.out.println("请输入整数n:");
System.out.println(result(new Scanner(System.in).nextInt()));
}
static double result(int n){
double flag = -1.0;
double sum = 0;
for(int i = 1; i <= n; i += 2){
sum += (flag *= (-1)) / i;
}
return sum*4;
}
}