using System;
public class Program
{
public static void Main()
double result = 1;
Console.WriteLine("Number of iterations:");
int input = int.Parse(Console.ReadLine());
for (int i = 1; i < input; i++)
if (i % 2 == 0)
result += (1 / (1.0 + (2 * i)));
}
else
result -= (1 / (1.0 + (2 * i)));
Console.WriteLine(result * 4);