def main():
    a, b, c, x, y = (int(i) for i in input().split())
    total=0
    total_half=0
    z=0
    if ( a+b < c):
        ab1 = a + b
    else:
        ab1 = 2*c
    if (x<y):
        total+=x*ab1
        total += (y-x)*b
        total_half += y*ab1
    else:
        total+=y*ab1
        total += (x-y)*a
        total_half += x*ab1
    if (total < total_half):
        print(total)
    else:
        print(total_half)
main()