#include using namespace std; int main(){ vector l(3); cin>>l[0]>>l[1]>>l[2]; int r,b,y; cin>>r>>b>>y; sort(l.begin(),l.end()); int ans=(1<<30); do{ int temp=2*r*(l[0]+l[2])+2*b*(l[1]+l[2])+2*y*(l[0]+l[1]); ans=min(ans,temp); }while(next_permutation(l.begin(),l.end())); cout<