a = int(input("pecas de ouro"))
b = input("nome da armadura")
d = int(input("valor sorteado"))
if(b=="INTEIRA") and (a >= 200):
	e=30 * d - 20
	print(e)
elif(b=="PLACA") and (
		e=20 * d - 18
		print(e)
elif(b=="MALHA") and (a==)
		e= 15 * d - 1
		print(e)
elif(d > 8) and (d < 1):
	print("Entrada invalida")
else :
	print("PO insuficiente")
		
