from solution import producteEscalar

def llista():
	s = input()
	s = s[1:len(s)-1]
	print(s)
	l = [int(e) for e in s.split(', ')]
	return l

print(producteEscalar(llista(), llista()))

