# 老实人写法
h = int(input())
total = 0
current = h  # 当前高度
# 模拟5次落地过程
for i in range(5):
    # 下落过程
    total += current
    # 反弹(最后一次落地后不反弹)
    if i < 4:
        current /= 2
        total += current
# 第五次反弹高度
bounce5 = h / (2**5)
print(total)
print(bounce5)

# 无敌偷懒大王写法
# h = int(input())
# distance = h*2.875
# hight = h / (2**5)
# print(distance)
# print(hight)