# 20240917
H1 = int(input())
H2 = H1/2
H3 = H2/2
H4 = H3/2
H5 = H4/2
H6 = H5/2           # 第5次反弹的高度
sum_h = H1+2*(H2+H3+H4+H5)
print(sum_h)
print(H6)