import sys

data=int(sys.stdin.readline())
# print(data)

def calc(n):
    val=0
    count=0
    while count<5:
        val=val+n  #下落
        n=n/2      #反弹高度
        val=val+n  
        count=count+1
    return (val-n,n)

rs=calc(data)
print(rs[0])
print(rs[1])