while True:
    try:
        #获取初始高度
        h = int(input())
        #一共经过的距离S
        S = 0
        h1 = h
        for n in range(0,5):
            S = S + h1 + h1 / 2
            h1 = h1 / 2
        h5 = h * (1/2)**5
        print(S-h5)
        print(h5)
        
    except:
        break