months_kol = int(input())
p = int(input())
vkl = 1000
for i in range(months_kol):
vkl += vkl*p/100
print(vkl)
months_kol = int(input())
p = int(input())
vkl = 1000
for i in range(months_kol):
vkl += vkl*p/100
print(vkl)