a,b,c,d=map(int,input().split())
score=a*0.2+b*0.1+c*0.2+d*0.5
print(f"{score:.1f}")