laptopPrice = int(input())
taxPercentage = int(input())
totalPrice = int((laptopPrice * taxPercentage / 100) + laptopPrice)
print(totalPrice)
numberOfYears = int(input())
totalChildren = int(input())
totalSalary = int(400 + (20 * numberOfYears) + (30 * totalChildren))
print(totalSalary)