while True:
try:
high=int(input())
count=high
xi=high
for i in range(1,5):
xi=xi/2
count=count+xi*2#求总高度
x5=xi/2#求第五次反弹高度
print(count)
print("%.6f"%x5)#最后的误差判断是小数点6位
except:
break