t;double r,d,n,c;main(i){for(;~scanf("%d",&t);r=--i?r:1)d+=r*=.9,c+=r*r,n+=r*pow(2,t/8e2);printf("%.f",800*log2(n/d)+358-1557*sqrt(c)/d);}