print("Стоимость 1 газеты = ");
input1 = int(input());
print("Кол-во газет = ");
input2 = int(input());
sum1 = 0;
if input2 > 50:
input2 = input2 - 50;
sum1 = 50 * input1;
while(input2 != 0):
input2 = input2 - 1;
sum1 = sum1 + (input1 / 100 * 120);
else:
while(input2 != 0):
input2 = input2 - 1;
sum1 = sum1 + input1;
print(sum1)