#include int main(){ int c,d; double p,max; scanf("%d %d",&c,&d); if(3*d-c<0){ max=4000.0*(double)d; }else{ if(5*c-2*d>0){ max=4000.0*(double)c/3.0+34000.0*(double)(3*d-c)/39.0; }else{ max=21000.0*(double)c/3.0; } if(14*d-35*c>0){ p=4000.0*(double)d-6000.0*(double)(3*d-c)/13.0; }else{ p=2800.0*(double)d; } max=(max