n = int(input().strip())
total_h = n
t = 2
n = n/2
while(t <= 5):
total_h = total_h + n * 2
n = n/2
t = t+1
print(total_h)
print(n)
n = int(input().strip())
total_h = n
t = 2
n = n/2
while(t <= 5):
total_h = total_h + n * 2
n = n/2
t = t+1
print(total_h)
print(n)