pigs = int(input("Amount of pigs: "))
cows = int(input("Amount of cows: "))
chickens = int(input("Amount of chickens: "))

total = pigs * 4 + cows * 4 + chickens * 2
print("Total amount of legs:", total)
