import sys
if __name__ == "__main__":
    A, B, C, X, Y = list(map(int, (input().split(' '))))
    cost_A = A * X
    cost_B = B * Y
    least_cost = cost_A + cost_B
    max_cnt = 0
    if X >= Y:
        max_cnt = X
    else:
        max_cnt = Y
    for i in range(0, max_cnt+1):
        buf_cost_A = 0
        buf_cost_B = 0
        if (X - i*2) < 0:
            buf_cost_A = C * i * 2
        else:
            buf_cost_A = (X - i*2) * A + C * i * 2
        if (Y - i*2) < 0:
            buf_cost_B = C * i * 2
        else:
            buf_cost_B = (Y - i*2) * B + C * i * 2
        if least_cost > (buf_cost_A + buf_cost_B):
            least_cost = buf_cost_A + buf_cost_B
    print(least_cost)