collection_items = input().split("|") budget = float(input()) ticket_price = 150 initial_budget = budget total_earned_money = 0 earned_money = [] for item in collection_items: item_arg = item.split("->") item_name = item_arg[0] item_price = float(item_arg[1]) if item_name == "Clothes" and item_price > 50: continue if item_name == "Shoes" and item_price > 35: continue if item_name == "Accessories" and item_price > 20.50: continue budget -= item_price sell_price = (item_price * 1.4) earned_money.append(f"{sell_price:.2f}") total_earned_money += sell_price if budget < item_price: break final_money = " ".join(earned_money) profit = total_earned_money + budget - initial_budget print(final_money) print(f"Profit: {profit:.2f}") if total_earned_money + budget >= ticket_price: print("Hello, France!") else: print("Not enough money.")