peterverebics/CodeNet_Python_118 huggingface dataset:
def maxvolume (s): 
	maxvalue = 0
	i = 1
	for i in range(s - 1): 
		j = 1
		for j in range(s): 
			k = s - i - j  
			maxvalue = max(maxvalue, i * j * k) 
	return maxvalue 
L = int(input())
print(maxvolume(L))
L=int(input())
ans=0
tmp=0
d=3
for i in range(int(L*d/1.7)):
  for j in range(int((L*d-i)/1.7)):
    tmp=(i/d)*(j/d)*(L-(i/d)-(j/d))
    ans=max(ans,tmp,0)
print(ans)
import sys
import os
import decimal
decimal.getcontext().prec = 6

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    L = int(sys.stdin.buffer.readline().rstrip())
    if L == 1:
        print(0.027)
        exit()

    if L == 2:
        print(0.287496)
        exit()

    ret = 0
    for l in range(L):
        for m in range(L - l):
            ret = max(ret, l * m * (L - l - m))

    print(ret)


if __name__ == '__main__':
    main()
import os
import math

def main():
    l = int(input())

    if l%3 == 0:
        s = l//3
        
        print(s*s*s)
    elif l%3 == 1:
        s = l//3
        s1 = s + 0.5
        
        print(s*s1*s1)
    elif l%3 == 2:
        s = l//3
        s1 = s + 1
        
        print(s*s1*s1)

if __name__ == "__main__":
    main()
import numpy as np

L = int(input())
ans = 0

for x in np.arange(0,L+1,0.01):
    t = ((L-x)/2)**2
    if ans < x*t:
        ans = x*t
    else:
        continue

print(ans)
L=int(input())
ans=0
tmp=0
#分割数
d=400
l=3
L_=int(L**(1/3))
for i in range(max(0,int(L_-l)*d),int(L_+l)*d):
  for j in range(max(0,int(L_-l)*d-i),int(L_+l)*d-i):
    tmp=(i/d)*(j/d)*(L-(i/d)-(j/d))
    ans=max(ans,tmp,0)
print(ans)
L = 999
HWL = L/3

print(HWL ** 3)
def maxVolume(L):
    length = int(L / 3)
    L -= length
    breadth = L / 2

    height = L - breadth

    return int(length * breadth * height)


L = int(input())
print(maxVolume(L))
L=int(input())
ans=0
tmp=0
#分割数
d=100
l=20
L_=int(L**(1/3))
for i in range(max(0,int(L_-l)*d),int(L_+l)*d):
  for j in range(max(0,int(L_-l)*d-i),int(L_+l)*d-i):
    tmp=(i/d)*(j/d)*(L-(i/d)-(j/d))
    ans=max(ans,tmp,0)
print(ans)
from math import sqrt 

  
# function to return maximum volume 

def maxVol(P, A): 

      

    # calculate length 

    l = (P - sqrt(P * P - 24 * A)) / 12

  

    # calculate volume 

    V = l * (A / 2.0 - l * (P / 4.0 - l)) 

  

    # return result 

    return V 

  
# Driver code 

if __name__ == '__main__': 

    P = 20

    A = 16

    print(maxVol(P, A))
def solution():
    l = int(input())
    
    maximum = 0
    for i in range(1, l*10):
        yoko = 0.1 * i
        for j in range(l*10-i):
            tate = 0.1 * j
            calc = tate * yoko * (l - tate - yoko)
            maximum = max(maximum, calc)
    print(maximum)

solution()
L = int(input())

ans = -1
for i in range(1, L):
    for j in range(1, L):
        if i + j > 999:
            break
        k = L - (i + j)
        ans = max(ans, i * j * k)
print(ans)
l=100*int(input())
candi=[[0] * l for i in range(l)]
ans=[]
for i in range(l):
  for j in range(l):
    if i+j<=l:
      candi[i][j]=float(i*j*(l-i-j))
  ans.append(max(candi[i]))
print(max(ans)/(10**6))
l = int(input())

print((l // 3) ** 2 * (l - 2 * (l // 3)))
def m( s ): 
    length = int(s / 3) 
    s -= length 
    breadth = s / 2
    height = s - breadth 
    return (length * breadth * height) 
x=int(input())    
print("{:.12f}".format(m(x)))
l = int(input())
max = 0
for x in range(l):
	for y in range(l):
			v = x * y * (l - x - y)
			if v > max:
				max = v
print(float(max))
l = int(input())

print(int((l / 3)*(l / 3)*(l / 3)))
L = int(input())

ans = 0
tmp = 0

a = 0.001
b = 0.001
c = L - a - b
while (a <= L):
    while ( b <= a):
        c = L - b - a
        tmp = a * b * c
        if (ans < tmp):
            ans = tmp
        b = b + 0.005
    a = a + 0.005

print(ans)
n=int(input())
s=n//3
if n%3==1:print(s*(s+0.5)**2)
elif n%3==2:print(max(s*(s+1)*(s+1),s*(s+2)*s))
else:print(s**3)
L=int(input())
L1=(L//3)
L2=L%3
while L2>=10**-10:
    L1+=(L2/3)
    L2=(L2/3)

print(L1**3)
L = int(input())
ans = 0
for i in range(1,L):
    for j in range(1,L-i):
        ans = max(ans,i*j*(L-i-j))
print(ans)
L = int(input())
ans = 0
if L >= 3:
    for i in range(1, L-1):
        for j in range(1, L-i):
            ans = max(ans, i*j*(L-i-j))
else:
    L = 10 * L
    for i in range(1, L-1):
        for j in range(1, L-i):
            ans = max(ans, i*j*(L-i-j))
    ans = ans / 1000
print(ans)
L = int(input())
if L % 3 == 0:
    print(L//3 * L//3 * L//3)
elif L % 3 == 1:
    kake = L // 3
    print(kake * kake * (kake+1))
else:
    kake = L // 3
    print((kake+1) * (kake+1) * kake)
l = int(input())

lx = int(l/3)

if l%3 == 0:
    print(lx*lx*lx)
elif l%3 == 1:
    print(round((lx+1)*lx*lx, 6))
elif l%3 == 2:
    print(round((lx+1)*(lx+1)*lx, 6))
L = int(input())

q, mod = divmod(L, 3)

if mod == 0:
    ans = q**3
elif mod == 1:
    ans = q * q * (q + 1)
elif mod == 2:
    ans = q * (q + 1) * (q + 1)

print(ans)
L=int(input())
tmp2=0
L*=10
for x in range(1,L+1):
    if x>(L+1)/2:
        print(tmp2/1000)
        exit(0)
    for y in range(1,L-x+1):
        z=L-x-y
        tmp=x*y*z
        if tmp>tmp2:
            tmp2=tmp

print(tmp2)
L = int(input())
if L%3==0:
    S = (L//3)**3
    print(S)
elif L%3==1:
    S = (L//3+1) * (L//3)**2
    print(S)
elif L%3==2:
    S = (L//3 + 1) * (L//3 +1) * (L//3)
    print(S)
from scipy.optimize import minimize
import numpy as np
L = int(input())


def volume(x):
    return -(x[0] * x[1] * (L - (x[0] + x[1])))


x0 = np.array([1, 1])
res = minimize(volume, x0, )
print(np.round(-res.fun))
L = int(input().split()[0])
max_a = -float("inf")
for x in range(L + 1):
    for y in range(L + 1):
        h = L - (x + y)
        if h > 0:
            max_a = max(max_a, x * y * h)
ans = max_a
print(ans)
def main():
    L = int(input())
    ans = 0
    for a in range(1, L-1):
        for b in range(a, L-a):
            v = a * b * (L - a - b)
            if v > ans:
                ans = v
    print(ans)


if __name__ == '__main__':
    main()
l = int(input())
i = l // 3 
print(float(i**3))
def maxvolume( s ): 

	# finding length 
	length = int(s / 3) 
	
	s -= length 
	
	# finding breadth 
	breadth = s / 2
	
	# finding height 
	height = s - breadth 
	
	return int(length * breadth * height) 
	
# Driven Program 
s = int(input())
print( maxvolume(s) )
L =int(input())

if L == 1:
    print('0.037036926')
elif L==2:
     print('0.296296074')
else:
    ans =0
    for i in range(2000):
        for j in range(1000):
            ans =max(ans, i/2*j*(L-(i/2+j)))
    print(ans)
l = int(input())
a,b,c = 0,0,0

if l%3 == 0:
    a = l//3
    b = l//3
    c = l//3
elif l%3 == 1:
    a = l//3 + 1
    b = l//3
    c = l//3
elif l%3 == 2:
    a = l//3 + 1
    b = l//3 + 1
    c = l//3

print(a*b*c)
import math
L = int(input())
m = 0
for i in range(L):
    for j in range(L):
        if i*j*(L-i-j)>=m:
            m = i*j*(L-i-j)
print('{:.12f}'.format(m))
l = int(input())
syo = l % 3
v = 0
l_3sq = l **(1/3)

if syo == 0:
    v = (l//3)**3
    print(v)
else:
    v = (l_3sq)**3
    print(v)
L = int(input())
q, mod = divmod(L, 3)

if mod == 0:
    print(q ** 3)
elif mod == 1:
    print(q**2 * (q + 1))
elif mod == 2:
    print(q* (q + 1) ** 2)
n = int(input())
f = n / 3
 
if(n % 3 == 1):
  a, b, c = f, f, f + 1
elif(n % 3 == 2):
  a, b, c = f, f + 1, f + 1
else:
  a, b, c = f, f, f
print(a * b * c)
L=int(input())
ans=[]
for i in range(1,1001):
    for j in range(1,1001):
        k=L-(i+j)
        ans.append(i*j*k)
Y=max(ans)
print(f"{Y:.12f}")
L = int(input())

ans = (3/L)**3
print(f'{ans:.012f}')
L = int(input())
ans = 0

for x in range(0,L):
  for y in range(0,L):
    z = L - x - y
    if x*y*z > ans: ans = x*y*z

print(ans)
# coding: utf-8

L = int(input())

if L % 3 == 0:
    print((L//3)**3)
elif L % 3 == 1:
    a = L // 3
    b = a + 1
    print(a**2*b)
else:
    a = L // 3
    b = a + 1
    print(a*b**2)
L=int(input())
ans=0
tmp=0
d=3
for i in range(int(L*d/1.5)):
  for j in range(int((L*d-i)/1.5)):
    tmp=(i/d)*(j/d)*(L-(i/d)-(j/d))
    ans=max(ans,tmp,0)
print(ans)
l = int(input())

max_ = 0

for i in range(l):
    for j in range(l-i):
        max_ = max(i*j*(l-i-j),max_)

print(max_)
l = int(input())
if l%3 == 0:
    print((l/3)**3)
elif l%3 == 1:
    print((l/3)*(l/3)*(l/3 + 1))
else:
    print(((l/3)*(l/3)*(l/3 + 2)))
L = int(input())

V = 0

for w in range(1001):
    for h in range(1001):
        d = L - w - h
        if d <= 0:
            continue
        V = max(V, w * h * d)
print(V)
l = int(input())
mx = 0

for a in range(1, l+1):
    for b in range(1, l+1):
        v = a * b * (l-a-b)
        if mx < v:
            mx = v

print(mx)
from sys import *
from math import *
from collections import deque
input = stdin.readline
lmi = lambda: list(map(float, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()

l = int(input())
print("{:.9f}".format((l/3) ** 3))
n = input()
num = int(n)

if (num % 3) == 0:
	num = num//3
	num = num**3
	print(num)
elif ((num + 1)%3) == 0:
    num = (num+1)//3
    num = (num**2) * (num-1)
    print(num)
elif ((num + 2)%3) == 0:
    num = (num+2)//3
    num = num * (num-1) * (num-1)
    print(num)
L = int(input())

max = 0
X=0
Y=0
Z=0

for x in range(L+1):
  for y in range(L-x+1):
    z = L-x-y
    if x*y*z >= max:
      max = x*y*z
      X = x
      Y = y
      Z = z

for i in range(100):
  for s in range(100):
    new_z = L - (float(X)+i*0.01) - (float(Y)+s*0.01)
    if new_z * (float(X)+i*0.01) * (float(Y)+s*0.01) >= max:
      max = new_z * (float(X)+i*0.01) * (float(Y)+s*0.01)

print(max)
n=int(input())
if n%3==0:
    print((n//3)**3)
else:
    v=n-(n//3)*3
    a=(n//3)+v
    print(a*(n//3)*(n//3))
L=int(input())
a = L/3
print((a*3)/3)
l = int(input())
mx = 0

for a in range(1, l+1):
    for b in range(1, l+1):
        v = a * b * (l-a-b)
        if mx < v:
            mx = v

print(float(mx))
import math
l = int(input())
n = math.ceil(l/9) - 1
l = l / 3
print(n)
print(int(l**3-n))
l=int(input())
n=l//3
print(n*n*n)
L = int(input())
v=-1
for x in range(1,L):
    for y in range(1,L-x):
        v = max(v, x*y*(L-x-y))
print(v)
#!/usr/bin/env python3
def main():
    L = int(input())

    ans = 0
    for a in range(min(L, 1000)):
        b = (L - a) / 2
        ans = max(ans, a * b * b)
    print(ans)


if __name__ == '__main__':
    main()
L=int(input())
ans=0
tmp=0
d=4
for i in range(int(L*d/1.7)):
  for j in range(int((L*d-i)/1.7)):
    tmp=(i/d)*(j/d)*(L-(i/d)-(j/d))
    ans=max(ans,tmp,0)
print(ans)
L=int(input())
n1=n3 = L//3
for i in range(1,3):
    if n1*2+n3 != L:
        n3+=1
print(n1**2*n3)
l = int(input())
syo = l % 3
v = 0

if syo == 0:
    v = (l//3)**3
    print(v)
elif syo == 1:
    v = ((l-1)//3)**2 * ((l-1)//3 +1)
    print(v)
elif syo == 2:
    v = ((l+1)//3)**2 * ((l+1)//3 -1)
    print(v)
import numpy as np

L = int(input())

xyz  = 0

for i in np.arange(1,L,0.1):
  x = i
  for j in np.arange(1,L-i,0.1):
    y = j
    z = L-i-j
    if xyz < x*y*z:
      xyz=x*y*z
  
print (xyz)
l = int(input())

ans = 0
for i in range(l):
    for j in range(l - i):
        volume = i * j * (l - i - j)
        ans = max(ans, volume)

print(ans)
l=int(input())
ans=0
for i in range(l):
    i=float(i)
    tmp=0
    for j in range(l):
        j=float(j)
        k=l-i-j
        k=float(k)
        tmp=i*j*k
        ans=max(ans,tmp)
print(ans)
n = int(input())
ans = 0
for i in range(1,1001):
    for j in range(1,1001):
        k = n-(i+j)
        ans = max(i*j*k,ans)
print(ans)
L = int(input())
ans = L**3//27
print('{:.10f}'.format(ans))
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    if n % 3 == 0:
        ret = (n / 3) ** 3
    elif n % 3 == 1:
        num = round(n / 3, 1)
        ret = num * num * round(num + 0.1, 1)
    else:
        num = round(n / 3, 1)
        ret = num * num * round(num - 0.1, 1)
    print('%.12f' % ret)


if __name__ == '__main__':
    main()
def abc159c_maximum_volume():
    l = int(input())
    result = 0
    for i in range(1, l-1):
        for j in range(i, l):
            result = max(result, i*j*(l-i-j))
    print(result)

abc159c_maximum_volume()
#ABC.C159
L = int(input())
x = L//3
print(x**3)
L = int(input())

import random

vol_max = 0

for i in range(100000):
    a = random.uniform(0, L)
    b = random.uniform(0, L-a)
    c= L-a-b
    vol = a*b*c
    if vol_max < vol:
        vol_max = vol
    else:continue
        
print(vol_max)
import numpy as np

L = int(input())
ans = 0

for x in np.arange(0,L+1,0.01):
    t = ((L-x)/2)**2

    if x == 0:
        if ans < t:
            ans = t
        else:
            continue
    elif t == 0:
        if ans < x:
            ans = x
        else:
            continue
    else:
        if ans < x*t:
            ans = x*t
        else:
            continue



print(ans)
n = int(input())
t = 0
for i in range(1, n+1):
    for j in range(1, i+1):
        t = max(t, i * j * (n - i - j))
print(t)
l = int(input())*100
Ma = 0

for i in range(0, l+1, 1):
    for j in range(0, l-i, 1):
        z = l - (i+j)
        result = z*i*j
        if(result>Ma):
            Ma = result
print(Ma/1000000)
import sys
import os

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    L = int(sys.stdin.buffer.readline().rstrip())

    ret = 0
    for l in range(L):
        for m in range(L - l):
            ret = max(ret, l * m * (L - l - m))

    print(ret)


if __name__ == '__main__':
    main()
l=float(input())
if l%3<2:
    print(((l//3)**2)*(l//3+l%3))
else:
    print(l//3*((l//3+1)**2))
#C
L = int(input())
a = L/3
b = L/3
c = L/3
print(str(round(round(a, 3)*round(b, 3)*round(c, 3),7)))
L=int(input())
l=10*L
m=0
for a in range(1,l+1):
  for b in range(1,l-a+1):
    if m<a*b*(l-a-b):
      m=a*b*(l-a-b)
        
print(m/1000)
import sys
import os
import collections


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    L = int(sys.stdin.buffer.readline().decode().rstrip())
    print(L ** 3 // 27)


if __name__ == '__main__':
    main()
import numpy as np

l = int(input())
max = 0.0
for x in range(l):
	for y in np.arange(0, l, 0.2):
			v = x * y * (l - x - y)
			if v > max:
				max = v
print(max)
L = int(input())

volume = L ** 3 / 9

print(volume)
a = int(input())
if a < 3:
	print(0)
else:
	yy = a // 3
	x = yy
	y = yy
	z = yy
	r = a % 3
	if r == 1:
		z+=1
	elif r == 2:
		z+=1
		y+=1
	print(x*y*z)
L = int(input())

if L >= 3:
  print((L**3)/27)
else:
  print(L)
N=int(input())
if N%3==0:
     a=b=c=N/3

elif N%3==1:
     b=c=int(N/3)
     a=b+1

elif N%3==2:
     c=int(N/3)
     a=b=c+1

print(a*b*c)
n = int(input())
x = [n//3 for _ in range(3)]
y =1
for i in range(n%3):
    x[i-1] += 1
for j in x:
    y *= j
print(y)
l=int(input())
if l==1:
	print((1/3)**3)
	exit()
if l==2:
	print(0.25)
	exit()
a=l/3
b=l/3
c=l/3
temp=l%3 
cc=0
while temp>0:
	temp-=0.5 
	if cc%3==0:
		a+=0.5
	elif cc%3==1:
		b+=0.5 
	else:
		c+=0.5
	cc+=1 
print("%.8f"%(a*b*c))
import scipy.optimize

L = int(input())

func = lambda x: -1 * (x[0] * x[1] * (L - x[0] - x[1]))

res = scipy.optimize.minimize(func, (1 ,2), bounds = ((0, None), (0, None)))

print(-1 * res.fun)
import numpy as np
l = int(input())
m = 0
for t in np.arange(0.1,(l-0.2)):
  for o in np.arange(0.1,(l-0.2)):
    x = t*o*(l-t-o)
    m = x if m<x else m  
 #   print(t,o,y)

print(m)
l = int(input())
a = l//3
b = l//3
c = l - a - b
cub = a * b * c
print(cub)
l = int(raw_input())
print (l/3)**3 + 1e-21
l = int(input(""))
a = 0.001
b = l - 2 * a
V = 0
V_vec = [0,0]
for i in range(l*99):
    if V < a * a * b :
        V = a * a * b
        V_vec = [a,b]
    a += 0.01
    b = l - 2 * a
print(V)
def main():
    L = int(input())

    ans = 0.0
    for x in range(0, 1001):
        for y in range(0, 1001):
            if x + y > 1000:
                break
            tmp = x*y*(L - x - y)

            if tmp > ans:
                ans = tmp
    print('{0:.7f}'.format(ans))


if __name__ == '__main__':
    main()
L=int(input())
s=L//3
t=L%3
if t==0:
    print(s**3)
elif t==1:
    print((s**2)*(s+1))
else:
    print(((s+1)**2)*s)
l=int(input())
a=l//3
print(a*a*(l-2.0*a))
L = int(input())

print(format((L*3/9),'.20f'))
import math
import itertools
import statistics
#n, m = list(map(int, input().split()))
L = int(input())

x = L//3
ans = (x*x*(L-x*2))
print(float(ans))
l = int(input())
ls = []

for i in range(l*10):
    i2 = i/10
    x = i2
    for ii in range(l*10 - i):
        y = ii/10
        z = l - x - y
        lsa = [x, y, z]
        ls.append(lsa)
vols = []
def culv(l):
    x = l[0]
    y = l[1]
    z = l[2]
    v = x * y * z
    return v
for i in ls:
    a = culv(i)
    vols.append(a)

mxv = max(vols)
print(mxv)
l = int(input())
m = 0
for t in range(1,l+1):
  for o in range(1,l+1):
    y = l - t - o
 #   print(t,o,y)
    if y>0 and  t*y*o >=m:
      m = t*y*o

print(m)
n=int(input())
ans=[]

for B in range(1,n+1):
  for C in range(1,n+1):
    new_high=(n-(B+C))*B*C
    ans.append(new_high)
      
print(max(ans))
L = int(input())

xyz  = 0

for i in range(L*10):
  x = i/10
  for j in range(L*10-i):
    y = j/10
    z = L-x-y
    if xyz < x*y*z:
      xyz=x*y*z
  
print (xyz)
def main():
    L = int(input())

    ans = 0

    for a in range(1, L):
        for b in range(1, L):
            c = L - a - b
            if c < 1:
                break
            V = a*b*c
            if V > ans:
                ans = V
    print(ans)


    return 0


if __name__ == '__main__':
    main()
L = int(raw_input())
x = round(float(L/3), 6)
print(x*x*x)
L=int(input())
ans=0
for i in range(1,(L*100)//3+1):
  x=i
  for j in range(x,(L*100-x)//2+1):
    y=j
    ans=max(ans,(L*100-(x+y))*x*y)
    
print(ans/1000000)
l=int(input())
ans=0
for y in range(1,1001):
    for z in range(1,1001):
        if(l-y-z<=0):
            continue
        else:
            ans=max(ans,y*z*(l-y-z))
print(ans)
L = int(input())
a = L // 3
b = L // 3
c = L - a - b
print(a*b*c)
# input
L = int(input())

# initialization
c = L / 3

if L==1 or L==2:
    c = L / 3
    print(c*c*c)
else:
    if L%3==0:
        c = L / 3
        print(c*c*c)
    elif L%3==1:
        c = L // 3
        d = c + 1
        print(c*c*d)
    else:
        c = L // 3
        d = c + 1
        print(c*d*d)
l = int(input())
if l%3 == 0:
    print((l//3)**3)
elif l%3 == 1:
    print((l//3)*(l//3)*((l//3)+1))
else:
    print((l//3)*(l//3+1)*((l//3)+1))
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    L = int(input())

    l = L // 3
    ans = 0
    for l1 in range(l, L - 1):
        for l2 in range(l1, L - 1):
            l3 = L - l1 - l2
            ans = max(ans, l1 * l2 * l3)
    print(ans)


main()
import sys
import numpy as np
# input処理を高速化する
input = sys.stdin.readline

L=int(input())
div =100000
V=0
for x in [i/div for i in range(L+1)]:
    for y in [j/div for j in range(L-int((x*div))+1)]:
        X=(x*div)
        Y=(y*div)
        Z = L-X-Y
        V = max(V, X*Y*Z)
print(V)
L =int(input())

if L == 1:
    print('0.037036926')
elif L==2:
     print('0.296296074')
else:
    ans =0
    for i in range(1500):
        for j in range(1500):
            ans =max(ans, i/1.5*j/1.5*(L-(i/1.5+j/1.5)))
    print(ans)
L = int(input())
ans = 0
for x in range(1, 1000):
    for y in range(1, 1000):
        for z in range(1, L-x-y+1):
            ans = max(ans, x*y*z)
print(ans)
import math
L = int(input())
m = 0
for i in range(L+1):
    for j in range(L-i+1):
        if i*j*(L-i-j)>=m:
            m = i*j*(L-i-j)
print('{:.12f}'.format(m))
#author : dokueki

import sys


def IOE():
    sys.stdin = open("input.txt", "r")
    sys.stdout = open("output.txt", "w")


def main():
    n = int(input())
    if n % 3 == 0:
        print((n // 3) ** 3)
    elif n % 3 == 2:
        print(2*pow(3, n//3))
    else:
        print(2*2*pow(3, (n//3)-1))


if __name__ == "__main__":
    #IOE()
    main()
L = int(input())
Max = 0

for i in range(1, L - 1):
    for j in range(1, L - 1):
        val = i * j * (L - i - j)
        if val > Max:
            val, Max = Max, val

print(Max)
L = int(input())

result = L / 3
for i in range(0,3):
  result *= result
  
print(result)
import sys

def main():
  input = sys.stdin.readline
  L = int(input())

  xyz  = 0

  for i in range(L*10):
    x = i/10
    for j in range(L*10-i):
      y = j/10
      z = L-x-y
      newxyz = x*y*z
      if xyz < newxyz:
        xyz=newxyz

  print ('{0:.6f}'.format(xyz))


if __name__ == '__main__':
  main()
L= int(input())

list = 0
for i in range(L):
    for j in range(L-i):
        k = L - i -j
        V = i*j*k
        if V > list:
            list = V
print(list)
l=float(input())
if l%3==0:
    print((l/3)**3)
elif l%3==1:
    print(((l//3+0.3)**2)*(l//3+0.4))
else:
    print(((l//3+0.7)**2)*(l//3+0.6))
l = int(input())

ans=-1
for i in range(1,l):
    for j in range(1,l):
        k = l-(i+j)
        if k<=0:
            continue
        ans=max(ans,i*j*k)
print(ans)
L = input()

x=0
if int(L)<=2:
    print((int(L)/3)**3)
else:
    for i in range(int(L)):
        if 3*x < int(L):
            x += 1
        else:
            break
    print(x**3)
L=int(input())
ans=0
for j in range(1,10*L+1):
    i=j/10
    ans=max(ans,i*i*(L-2*i))
print(ans)
l = int(input())

a = l // 3
b = (l - a) // 2
c = l - a - b

print(a * b * c)
L = int(input())
x = int(L/3)
print(x**3)
# L = x + y + z
# S = x*y*z
#これをSが最大となるようにyとLの式で表すと
# S_max = 1/2 * (L - y) * y * 1/2 * (L - y) = 1/4 * (y**3 - 2*L*y**2 +L**2 * y)

L = int(input())
S_list = []
for y in range(L*10**2):
    y_cal = y / 10**2
    s  = 1/4 * (y_cal**3 - 2*L*y_cal**2 +L**2 * y_cal)
    S_list.append(s)

S_max = max(S_list)
print(S_max)
# Python3 code to Maximize volume of 
# cuboid with given sum of sides 

# Return the maximum volume. 
def maxvolume(s):
    # finding length
    length = int(s / 3)

    s -= length

    # finding breadth
    breadth = s / 2

    # finding height
    height = s - breadth

    return length * breadth * height


# Driven Program
s =int(input())
t=maxvolume(s)
print(t)
l = int(input())

fans = 0

a = l // 3
bc = (l - a)
b = bc // 2
c = bc - b
fans = max(fans, a * b * c)


a = l // 3
if l % 3 != 0:
    a += 1
bc = (l - a)
b = bc // 2
c = bc - b
fans = max(fans, a * b * c)
print(float(fans))
#C
L = int(input())
a = L/3
b = L/3
c = L/3
print(str(round(a, 2)*round(b, 2)*round(c, 2)))
l = int(input())

if l%3 == 0:
  print((l/3)**3)
elif l%3 == 1:
  print(((l//3)**2)*(l//3+1))
else:
  print((l//3)*(l//3+2)**2)
L = int(input())
q, mod = divmod(L, 3)
if mod == 0:
    print(q**3)
elif mod == 1:
    print(q**2*(q+1))
elif mod == 2:
    print(q*(q+1)**2)
from decimal import *
N = input()

print(Decimal(N) // Decimal(3))
import math

L = int(input())
if L % 3 == 0:
    print(float((L/3) ** 3))
elif L % 3 == 1:
    k = math.floor(L/3)
    print(k*k*(k+1))
else:
    l = math.floor(L/3)
    print(l*(l+1)*(l+1))
import sys
rl = sys.stdin.readline


def solve():
    L = int(input())
    print((L // 3) ** 3)


if __name__ == '__main__':
    solve()
l = int(input())

a = l//3
v = a*a*a

print(v)
L = int(input())
print(L//3 * L//3 * L//3)
L = int(input())

ans = 0
for tate in range(1, 999):
    for yoko in range(1, 999):
        takasa = L - tate - yoko
        if takasa > 0:
            ans = max(ans, tate*yoko*takasa)
print(ans)
L = int(input())

volume = L ** 3 / 3

print(volume)
# Python3 code to Maximize volume of 
# cuboid with given sum of sides 

# Return the maximum volume. 
def maxvolume(s):
    # finding length
    length = int(s / 3)

    s -= length

    # finding breadth
    breadth = s / 2

    # finding height
    height = s - breadth

    return [length , breadth , height]


# Driven Program
s =int(input())
t=maxvolume(s)
if sum(t)==s:
    print(format((t[0]*t[1]*t[2]), '.10f'))
    #print(t[0]*t[1]*t[2])
L = int(input())
if L % 3 == 0:
    print( (L //3) ** 3)
elif L == 1:
    print(0.33 * 0.33 * 0.34)
elif L == 2:
    print(0.66 * 0.66 * 0.67)
elif L% 3 == 1:
    a = (L - 1)//3
    print(a * a * (a + 1))
elif L% 3 == 2:
    a = (L - 2)//3
    print(a *  (a + 1) * (a + 1))
l = int(input())

ans = 0
for i in range(1, l+1):
  for j in range(1, l-i+1):
    taiseki = i * j * (l-i-j)
    ans = max(ans, taiseki)

print(ans)