R,B,Y;f(a,b,c){return(a+b)*R+(b+c)*B+(c+a)*Y<<1;} main(a,b,c){scanf("%d%d%d%d%d%d",&a,&b,&c,&R,&B,&Y);printf("%.f",fmin(fmin(f(a,b,c),fmin(f(a,c,b),f(b,a,c))),fmin(f(b,c,a),fmin(f(c,a,b),f(c,b,a)))));}