import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{	
		Scanner in = new Scanner(System.in);
		int k;
		double val = 0;
		k = in.nextInt();
		for (int n = 1; n <= k; n++){
			val += 1.0/((3*n - 2)*(3*n + 1)); 
		}
		System.out.println(val);
	}
}