a,b,c,d=(map(int,input().split(' ')))    # 四个成绩分别赋值
# print(a,b,c,d)
totalscore=a*0.2+b*0.1+0.2*c+0.5*d
print('{:.1f}'.format(totalscore))