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