A,B,C,X,Y = map(int,input().split())
ans = 0
while (X + Y) > 0:
    if X >= 2 and Y >= 2:
        num = min(X//2,Y//2)
        ans += min((A+B),C*2) * 2 * num
        X -= 2 * num
        Y -= 2 * num
    elif X == 1 and Y >= 2:
        if A < C*2:
            ans += A
            X -= 1
        else:
            ans += C*2
            X -= 1
            Y -= 1
    elif Y == 1 and X >= 2:
        if B < C*2:
            ans += B
            Y -= 1
        else:
            ans += C*2
            X -= 1
            Y -= 1
    elif X == 1 and Y == 1:
        ans += min(A+B, C*2)
        X -= 1
        Y -= 1
    elif X == 0:
        ans += Y * min(B,C*2)
        Y = 0
    elif Y == 0:
        ans += X * min(A,C*2)
        X = 0

print(ans)
