
A,B,C,X,Y=map(int,input().split())

def dp(num_a,num_b,num_ab_a,num_ab_b):
    if num_a<=0 and num_b<=0:return 0
    elif num_b!=0:
        return min(B+dp(num_a,num_b-1,num_ab_a,num_ab_b),C*2+dp(num_a-1,num_b-1,num_ab_a,num_ab_b))
    else:
        return min(A+dp(num_a-1,num_b,num_ab_a,num_ab_b),C*2+dp(num_a-1,num_b-1,num_ab_a,num_ab_b))
print(dp(X,Y,0,0))