f=input s=sum(map(int,f().split())) print(int(f())/s*int(f()))