IT City administration has no rest because of the fame of the Pyramids in Egypt. There is a project of construction of pyramid complex near the city in the place called Emerald Walley. The distinction of the complex is that its pyramids will be not only quadrangular as in Egypt but also triangular and pentagonal. Of course the amount of the city budget funds for the construction depends on the pyramids' volume. Your task is to calculate the volume of the pilot project consisting of three pyramids — one triangular, one quadrangular and one pentagonal.

The first pyramid has equilateral triangle as its base, and all 6 edges of the pyramid have equal length. The second pyramid has a square as its base and all 8 edges of the pyramid have equal length. The third pyramid has a regular pentagon as its base and all 10 edges of the pyramid have equal length. [Image] 


-----Input-----

The only line of the input contains three integers l_3, l_4, l_5 (1 ≤ l_3, l_4, l_5 ≤ 1000) — the edge lengths of triangular, quadrangular and pentagonal pyramids correspondingly.


-----Output-----

Output one number — the total volume of the pyramids. Absolute or relative error should not be greater than 10^{ - 9}.


-----Examples-----
Input
2 5 3

Output
38.546168065709

Difficulty: MEDIUM_HARD
Tags: Geometry

Mathematics

Starter code:

Solutions:
import math
(a, b, c) = map(float, input().split())
ans = 0.0
ans += float(math.pow(a, 3) * math.sqrt(2) / 12)
ans += float(math.pow(b, 3) * math.sqrt(2) / 6)
ans += float(5 * math.pow(c, 3) * math.tan(math.radians(54)) * math.sqrt(1 - 1 / (4 * math.cos(math.radians(54)) * math.cos(math.radians(54)))) / 12)
print('%.20f' % ans)


import math
ns = [3, 4, 5]
L = list(map(int, input().split()))
PI = math.acos(-1)
ans = 0
for (n, l) in zip(ns, L):
	ang = PI / n
	r = l / 2 / math.sin(ang)
	S = n * math.sin(2 * ang) * r * r / 2
	h = (l ** 2 - r ** 2) ** 0.5
	ans += S * h / 3
print('%.10f' % ans)


import os, sys, pdb
import time, calendar, datetime
import math, itertools
import operator as op
from functools import reduce

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom
(l3, l4, l5) = list(map(int, input().split()))
a3 = l3 / (2 * math.tan(math.pi / 3))
a4 = l4 / (2 * math.tan(math.pi / 4))
a5 = l5 / (2 * math.tan(math.pi / 5))
B3 = 3 * l3 * a3 / 2
B4 = 4 * l4 * a4 / 2
B5 = 5 * l5 * a5 / 2
h3 = math.sqrt(3 * l3 ** 2 / 4 - a3 ** 2)
h4 = math.sqrt(3 * l4 ** 2 / 4 - a4 ** 2)
h5 = math.sqrt(3 * l5 ** 2 / 4 - a5 ** 2)
print((B3 * h3 + B4 * h4 + B5 * h5) / 3)


import math
(l1, l2, l3) = list(map(int, input().split()))
m1 = l1 * l1 - l1 * l1 / 4
h1 = math.sqrt(m1 - m1 / 9)
v1 = l1 * math.sqrt(m1) * h1 / 6
m2 = l2 * l2 - l2 * l2 / 4
h2 = math.sqrt(m2 - l2 * l2 / 4)
v2 = l2 * l2 * h2 / 3
m3 = l3 * l3 - l3 * l3 / 4
x = l3 * math.tan(54 * math.pi / 180) / 2
h3 = math.sqrt(m3 - x * x)
s3 = 5 * l3 * l3 / math.tan(math.pi / 5) / 4
v3 = s3 * h3 / 3
print(v1 + v2 + v3)


from math import *
(l3, l4, l5) = map(int, input().split())
a = l4 ** 3 / (3 * 2 ** 0.5)
b = 2 ** 0.5 * l3 ** 3 / 12
c = ((5 - 5 ** 0.5) / 10) ** 0.5 * 5 * l5 ** 3
c /= 12 * tan(pi / 5)
print(a + b + c)


from math import sqrt
(a, b, c) = list(map(int, input().split()))
V1 = a ** 3 * sqrt(2) / 12
V2 = sqrt(2) * b ** 3 / 6
V3 = (5 + sqrt(5)) / 24 * c ** 3
print(V1 + V2 + V3)


import math
(a, b, c) = map(lambda x: int(x), input().split(' '))
summ = 0
summ += (a ** 2 - ((a * a - a * a / 4) ** 0.5 * 2 / 3) ** 2) ** 0.5 * (a * a - a * a / 4) ** 0.5 * a / 2
summ += b * b * (b * b - b * b / 4 - b * b / 4) ** 0.5
a = c
b = a / (2 * math.sin(math.pi / 5))
summ += 5 / 2 * a * (b ** 2 - a * a / 4) ** 0.5 * (a * a - b * b) ** 0.5
print(summ / 3)


from math import tan, sin, sqrt, pi
liste = list(map(int, input().split(' ')))
sides = [3, 4, 5]
answer = 0
for i in range(3):
	n = sides[i]
	angle = pi / n
	answer += n / 12 * liste[i] ** 3 * sqrt(1 - 1 / (4 * sin(angle) ** 2)) / tan(angle)
print(answer)


import math
ln = input().split(' ')
l3 = int(ln[0])
l4 = int(ln[1])
l5 = int(ln[2])

def sin(deg):
	return math.sin(deg * math.pi / 180)
c1 = 1 / 3
c2 = 1 / 3
c3 = 1 / 3
tvol = c1 * l3 ** 3 / math.sqrt(8)
svol = c2 * l4 ** 3 / math.sqrt(2)
pvol = c3 * 5 / 4 * l5 ** 3 * math.tan(54 * math.pi / 180) * math.sqrt(1 - (sin(54) / sin(72)) ** 2)
print(tvol + svol + pvol)


import math
PI = math.acos(-1.0)
(x, y, z) = map(int, input().split())
s3 = math.sqrt(2) / 12 * math.pow(x, 3)
s4 = math.sqrt(2) / 6 * math.pow(y, 3)
t = math.sin(54 * 1.0 / 180 * PI) * (z * 1.0 / 2) / math.sin(36 * 1.0 / 180 * PI)
h = math.sqrt(math.sqrt(3) / 2 * z * 1.0 * (math.sqrt(3) / 2) * z * 1.0 - t * t)
s5 = 1.0 / 3 * (5.0 / 2) * z * t * h
print('{:.12f}'.format(s3 + s4 + s5).rstrip('0'))


import math
(l3, l4, l5) = map(int, input().split())
print(math.sqrt(2) * l3 ** 3 / 12 + l4 ** 3 / (3 * math.sqrt(2)) + l5 ** 3 * math.sqrt((5 - math.sqrt(5)) / 10) * math.sqrt(25 + 10 * math.sqrt(5)) / 12)


from math import sqrt
(x, y, z) = map(int, input().split())
s = sqrt(2) / 12 * x ** 3
p = sqrt(2) / 6 * y ** 3
d = 5 ** 0.5 * (5 + 2 * 5 ** 0.5) ** 0.5 / 4 * z ** 2
q = 1 / 3 * d * sqrt(z ** 2 * (3 - 5 ** 0.5) / (5 - 5 ** 0.5))
print(s + p + q)


from decimal import *
import math
getcontext().prec = 100

def cos(x):
	x = Decimal(x)
	getcontext().prec += 2
	(i, lasts, s, fact, num, sign) = (0, 0, 1, 1, 1, 1)
	while s != lasts:
		lasts = s
		i += 2
		fact *= i * (i - 1)
		num *= x * x
		sign *= -1
		s += num / fact * sign
	getcontext().prec -= 2
	return +s

def sin(x):
	x = Decimal(x)
	getcontext().prec += 2
	(i, lasts, s, fact, num, sign) = (1, 0, x, 1, x, 1)
	while s != lasts:
		lasts = s
		i += 2
		fact *= i * (i - 1)
		num *= x * x
		sign *= -1
		s += num / fact * sign
	getcontext().prec -= 2
	return +s

def v3(x):
	x = Decimal(x)
	w = Decimal(2).sqrt()
	return x ** 3 * w / 12

def v4(x):
	x = Decimal(x)
	w = Decimal(2).sqrt()
	return x ** 3 * w / 6

def tr(x):
	x = Decimal(x)
	p = Decimal(math.pi)
	return x / 180 * p

def v5(x):
	x = Decimal(x)
	l = x / 2 / sin(tr(36))
	h = (x * x - l * l).sqrt()
	s = l * l * sin(tr(72)) / 2 * 5
	return h * s / 3
(a, b, c) = map(eval, input().split())
print(v3(a) + v4(b) + v5(c))


import math

def DegToRad(x):
	return math.acos(-1) / 180 * x
(l3, l4, l5) = map(int, input().split())
v3 = l3 * l3 * l3 * math.sqrt(2) / 12
v4 = l4 * l4 * l4 * math.sqrt(2) / 6
a = l5
b = a / math.sqrt(2 - 2 * math.cos(DegToRad(72)))
h = math.sqrt(a * a - b * b)
s = b * b * math.sin(DegToRad(72)) * 2.5
v5 = s * h / 3
print(v3 + v4 + v5)


import math as m
l = [int(s) for s in input().split(' ')]
a = l[0]
b = l[1]
c = l[2]
alpha = 36 / 180 * m.pi
right = c / 2 / m.sin(alpha)
h = m.sqrt(c * c - right * right)
tamgiac = m.sqrt(2) * pow(a, 3) / 12
tugiac = m.sqrt(2) * pow(b, 3) / 6
ngugiac = h * c * m.sqrt(right * right - c * c / 4) / 6 * 5
print(tamgiac + tugiac + ngugiac)


(l3, l4, l5) = map(int, input().split())
V3 = 2 ** 0.5 / 12 * l3 ** 3
V4 = 2 ** 0.5 / 6 * l4 ** 3
V5 = 0.3015028323958315 * l5 ** 3
print(V3 + V4 + V5)


def cat(h, c):
	return (h * h - c * c) ** 0.5
(l3, l4, l5) = map(float, input().split())
s3 = l3 * l3 * 3.0 ** 0.5 / 4.0
s4 = l4 * l4
s5 = l5 * l5 * (25.0 + 10 * 5 ** 0.5) ** 0.5 / 4.0
r3 = l3 / 3.0 ** 0.5
r4 = l4 / 2.0 ** 0.5
r5 = l5 / 10.0 * (10.0 ** 0.5 * (5.0 + 5.0 ** 0.5) ** 0.5)
h3 = cat(l3, r3)
h4 = cat(l4, r4)
h5 = cat(l5, r5)
v3 = s3 * h3 / 3.0
v4 = s4 * h4 / 3.0
v5 = s5 * h5 / 3.0
print(v3 + v4 + v5)


sq2 = 2 ** 0.5

def PyraVolume(number, edge_length):
	el3 = edge_length ** 3
	if number == 3:
		return el3 / (6 * sq2)
	elif number == 4:
		return el3 / (3 * sq2)
	elif number == 5:
		return el3 * (5 + 5 ** 0.5) / 24
(a, b, c) = list(map(int, input().split()))
print(PyraVolume(3, a) + PyraVolume(4, b) + PyraVolume(5, c))


import math as ma

def fu(s):
	b = 54 * ma.pi / 180
	c = s / (2 * ma.cos(b))
	return ma.sqrt(s ** 2 - c ** 2)
(a, b, c) = list(map(int, input().split()))
print(a ** 3 / (6 * ma.sqrt(2)) + b ** 3 / (3 * ma.sqrt(2)) + 5 / 12 * ma.tan(54 * ma.pi / 180) * fu(c) * c ** 2)


import math
(l3, l4, l5) = map(int, input().split(' '))
v3 = l3 ** 3 / (6 * math.sqrt(2))
v4 = 1 / 3 * math.sqrt(1 / 2) * l4 ** 3
v5 = (5 + math.sqrt(5)) / 24 * l5 ** 3
print(v3 + v4 + v5)


__author__ = 'panag'
import sys
import math
(l1, l2, l3) = map(int, sys.stdin.readline().split(' '))
v1 = math.sqrt(3) / 4 * l1 ** 2 * 1 / 3 * math.sqrt(l1 ** 2 - (math.sqrt(3) / 3 * l1) ** 2) + l2 ** 2 * 1 / 3 * math.sqrt(l2 ** 2 - (l2 / math.sqrt(2)) ** 2) + math.sqrt(5) * math.sqrt(5 + 2 * math.sqrt(5)) / 4 * l3 ** 2 * 1 / 3 * math.sqrt(l3 ** 2 - (math.sqrt(10) * math.sqrt(5 + math.sqrt(5)) / 10 * l3) ** 2)
print(v1)


from decimal import *
from math import sqrt, tan, pi

def __starting_point():
	getcontext().prec = 50
	(l3, l4, l5) = map(Decimal, input().split())
	S3 = Decimal(sqrt(3)) * l3 * l3 / 4
	H3 = Decimal(sqrt(6)) * l3 / 3
	area3 = S3 * H3 / 3
	S4 = l4 * l4
	H4 = Decimal(sqrt(2)) * l4 / 2
	area4 = S4 * H4 / 3
	h5 = l5 * Decimal(tan(54 * pi / 180)) / 2
	S5 = l5 * h5 / 2 * 5
	H5 = Decimal(sqrt(3 * l5 * l5 / 4 - h5 * h5))
	area5 = S5 * H5 / 3
	res = area3 + area4 + area5
	print(res)
__starting_point()


import math
(a, b, c) = map(int, input().split())
v1 = math.sqrt(2) * a ** 3 / 12
v2 = b ** 3 / (3 * math.sqrt(2))
x = c / (2 * math.cos(0.9424777960769379))
v3 = 5 * c ** 2 * math.tan(0.9424777960769379) * math.sqrt(c ** 2 - x ** 2) / 12
print(v1 + v2 + v3)


(a, b, c) = list(map(int, input().split()))
ans = a ** 3 * 2 ** 0.5 / 12
ans += b ** 3 * 2 ** 0.5 / 6
R = 10 ** 0.5 / 10 * (5 + 5 ** 0.5) ** 0.5 * c
X = (c ** 2 - R ** 2) ** 0.5
s = c ** 2 * (25 + 10 * 5 ** 0.5) ** 0.5 / 4
ans += X * s / 3
print(ans)


(a, a1, a2) = map(int, input().split())
print(a ** 3 / 6 / 2 ** 0.5 + a1 ** 3 * 2 ** 0.5 / 6 + a2 ** 3 * (5 + 5 ** 0.5) / 24)


import math
(l3, l4, l5) = list(map(int, input().split(' ')))
print(math.sqrt(2) * l3 * l3 * l3 / 12 + math.sqrt(2) * l4 * l4 * l4 / 6 + (5 + math.sqrt(5)) * l5 * l5 * l5 / 24)


(l1, l2, l3) = input().split()
(l1, l2, l3) = (int(l1), int(l2), int(l3))
print(0.1178511301977579 * l1 ** 3 + 0.2357022603955158 * l2 ** 3 + 0.3015028323958316 * l3 ** 3)


from math import sin, cos, pi, tan
(l3, l4, l5) = map(int, input().split())

def f(n, x):
	R = 0.5 * x / sin(pi / n)
	h = (x ** 2 - R ** 2) ** 0.5
	base = n * R ** 2 * sin(2 * pi / n) * 0.5
	return base * h / 3
print(f(3, l3) + f(4, l4) + f(5, l5))


from math import sqrt as s
(x, y, z) = map(int, input().split())
print(pow(x, 3) * (1 / 6 / s(2)) + pow(y, 3) * (s(2) / 6) + pow(z, 3) * ((5 + s(5)) / 24))


(a, b, c) = map(int, input().split(' '))
tri = a * a * a / (6 * 2 ** 0.5)
long = b
short = b / 2 * 2 ** 0.5
h = (long ** 2 - short ** 2) ** 0.5
sq = b * b * h / 3
trash = (50 + 10 * 5 ** 0.5) ** 0.5 * c / 10
h2 = (c * c - trash ** 2) ** 0.5
print(h2 / 3 * (c * c / 4 * (25 + 10 * 5 ** 0.5) ** 0.5) + tri + sq)


import math
str = input().split()
PI = math.acos(-1.0)
ans = 0
l = float(str[0])
h = math.sqrt(2.0 / 3.0) * l
ans += 1.0 / 3.0 * math.sqrt(3) / 4.0 * l * l * h
l = float(str[1])
h = math.sqrt(1.0 / 2.0) * l
ans += 1.0 / 3.0 * l * l * h
l = float(str[2])
t = math.sin(54.0 / 180.0 * PI) / math.sin(72.0 / 180.0 * PI) * l
h = math.sqrt(l * l - t * t)
ans += 1.0 / 3.0 * t * t * math.sin(72.0 / 180.0 * PI) * 2.5 * h
print(round(ans, 10))


(a, b, c) = map(int, input().split())
V = a ** 3 * 2 ** 0.5 / 12
V += b ** 3 * 2 ** 0.5 / 6
V += c ** 3 * (5 + 5 ** 0.5) / 24
print(V)


3
import math
(a, b, c) = list(map(int, input().split()))
v1 = a ** 3 * 2 ** 0.5 / 12
v2 = b ** 3 * 2 ** 0.5 / 6
phi = 2 * math.pi / 5
L = c / (2 - 2 * math.cos(phi)) ** 0.5
v3 = 2.5 * L * L * math.sin(phi) * (c * c - L * L) ** 0.5 / 3
print(v1 + v2 + v3)


import math as m

def volume(n, x):
	q = m.pi * ((n - 2) / n)
	x = x / (2 * m.cos(q / 2))
	return 1 / 3 * (n / 2) * m.sin(q) * (4 * m.cos(q / 2) ** 2 - 1) ** 0.5 * x ** 3
(a, b, c) = [int(x) for x in input().split()]
print(volume(3, a) + volume(4, b) + volume(5, c))


from math import sqrt, tan, pi, sin
(a, b, c) = [int(x) for x in input().split()]
p = a * 3 / 2
s1 = sqrt(p * (p - a) * (p - a) * (p - a))
h1 = a / sqrt(3)
h1 = sqrt(a * a - h1 * h1)
v1 = s1 * h1 / 3
s2 = b * b
h2 = sqrt(2) * b / 2
h2 = sqrt(b * b - h2 * h2)
v2 = s2 * h2 / 3
h = 0.5 * c * 1 / tan(36 * pi / 180)
s3 = 0.5 * 0.5 * c * h * 10
h3 = 0.5 * c / sin(36 * pi / 180)
h3 = sqrt(c * c - h3 * h3)
v3 = s3 * h3 / 3
print(v1 + v2 + v3)


from math import sqrt
(l3, l4, l5) = map(int, input().split())
print(l3 ** 3 / (6 * sqrt(2)) + l4 ** 3 * sqrt(2) / 6 + l5 ** 3 * (5 + sqrt(5)) / 24)


from math import sqrt, cos, sin, pi
(a, b, c) = map(int, input().split())
abh = sqrt(a ** 2 - a ** 2 / 4)
aba = a * abh / 2
ah = sqrt(a ** 2 - (2 * abh / 3) ** 2)
aa = aba * ah / 3
bba = b * b
bh = sqrt(b ** 2 - (b / sqrt(2)) ** 2)
ba = bba * bh / 3
(x1, y1) = (0, 1)
(x2, y2) = (cos(18 / 360 * 2 * pi), sin(18 / 360 * 2 * pi))
d = sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
f = c / d
ch = sqrt(c ** 2 - f ** 2)
cba = f * f * sin(72 / 360 * 2 * pi) / 2 * 5
ca = cba * ch / 3
print(aa + ba + ca)


(l3, l4, l5) = map(int, input().split())
v3 = l3 ** 3 / (6 * 2 ** 0.5)
v4 = l4 ** 3 / (3 * 2 ** 0.5)
v5 = l5 ** 3 / 12 * (5 * (3 + 5 ** 0.5) / 2) ** 0.5
print(v3 + v4 + v5)


from functools import reduce
from math import factorial
(l1, l2, l3) = [int(x) for x in input().split()]
A = 2 ** 0.5 / 12
B = ((15 + 5 * 5 ** 0.5) / 288) ** 0.5
print((l1 ** 3 + 2 * l2 ** 3) * A + B * l3 ** 3)


import math
(l3, l4, l5) = list(map(int, input().split(' ')))
v3 = l3 ** 3 * math.sqrt(2) / 12
v4 = l4 ** 3 / math.sqrt(2) / 3
alpha = math.pi / 5
v5 = 5 / 12 * l5 ** 3 / math.tan(alpha) * math.sqrt(1 - 1 / (4 * math.sin(alpha) ** 2))
print('%.11f' % (v3 + v4 + v5))


from math import sqrt, sin, pi, tan

def altura(l, R):
	return sqrt(l ** 2 - R ** 2)

def volumen(A, h):
	return A * h / 3
(l3, l4, l5) = list(map(int, input().split()))
A3 = l3 ** 2 * sqrt(3) / 4
R3 = l3 / sqrt(3)
h3 = altura(l3, R3)
V3 = volumen(A3, h3)
A4 = l4 ** 2
R4 = l4 / sqrt(2)
h4 = altura(l4, R4)
V4 = volumen(A4, h4)
A5 = 5 * l5 ** 2 * tan(54 * pi / 180) / 4
R5 = l5 / (2 * sin(pi / 5))
h5 = altura(l5, R5)
V5 = volumen(A5, h5)
print(V3 + V4 + V5)


(a, b, c) = map(int, input().split())
v = a ** 3 / 6 / 2 ** 0.5
v += b ** 3 / 3 / 2 ** 0.5
v += c ** 3 * (5 + 5 ** 0.5) / 24
print(v)


import math
(a, b, c) = map(float, input().split())
v1 = math.sqrt(2) * a * a * a / 12.0
v2 = math.sqrt(2) * b * b * b / 6.0
v3 = c * c * c / 24.0 * (math.sqrt(5) + 5)
print(v1 + v2 + v3)