import math sushiType = input() restorant = input() portions = int(input()) online = input() total = 0.0 price = 0.0 if restorant == "Sushi Zone": if sushiType == "sashimi": price = 4.99 elif sushiType == "maki": price = 5.29 elif sushiType == "uramaki": price = 5.99 elif sushiType == "temaki": price = 4.29 elif restorant == "Sushi Time": if sushiType == "sashimi": price = 5.49 elif sushiType == "maki": price = 4.69 elif sushiType == "uramaki": price = 4.49 elif sushiType == "temaki": price = 5.19 elif restorant == "Sushi Bar": if sushiType == "sashimi": price = 5.25 elif sushiType == "maki": price = 5.55 elif sushiType == "uramaki": price = 6.25 elif sushiType == "temaki": price = 4.75 elif restorant == "Asian Pub": if sushiType == "sashimi": price = 4.5 elif sushiType == "maki": price = 4.8 elif sushiType == "uramaki": price = 5.5 elif sushiType == "temaki": price = 5.5 if restorant == "Sushi Zone" or restorant == "Sushi Time" or restorant == "Sushi Bar" or restorant == "Asian Pub": if sushiType == "sashimi": total = portions * price elif sushiType == "maki": total = portions * price elif sushiType == "uramaki": total = portions * price elif sushiType == "temaki": total = portions * price if online == 'Y': total = total * 0.20 + total print(f"Total price: {math.ceil(total)} lv.") else: print(f"{restorant} is invalid restaurant!")