w = int(input("white = "))
y = int(input("yellow = "))
b = int(input("blue = "))
r = int(input("red = "))

dishes = w+y+b+r
total = 0
total = w*1000 +y*2000 +b*3000 +r*5000
print("Total dishes =",dishes)
print("Total prics = ",total)