/* package whatever; // don't place package name! */

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
	{
		double a, b, c,f, p = 1.5;
		Scanner x = new Scanner(System.in);
		a=x.nextDouble();
	 	c = a/p;
		b = Math.floor(a/p);
		a = (c-b)*p;
		f = a*a*a-2.25*a;
		System.out.print(f);
	}
}