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