#迭代次数少直接流水5
ip = input()
#第一次落地
ld_1 = int(ip)
all_s = ld_1
#第二次落地
ld_2 = ld_1 / 2
all_s += 2*ld_2
#第三次落地
ld_3 = ld_2 / 2
all_s += 2*ld_3
#第四次落地
ld_4 = ld_3 / 2
all_s += 2*ld_4
#第五次落地
ld_5 = ld_4 / 2
all_s += 2*ld_5
print(round(all_s, 6))
print(round(ld_5/2, 6))