'''****** Задание ******** *Чек. ''' product = input() weight = int(input()) price = int(input()) cash = int(input()) print('Чек') print(f'{product} - {price}кг - {weight}руб/кг') print(f'Итого: {weight * price}руб') print(f'Внесено: {cash}руб') print(f'Сдача: {cash - weight * price}руб')