a,b,c,x,y = map(int,input().split())

if a//2 + b//2 > c:
    buf = min(x,y) * c * 2
    buf2 = max(x,y) * c * 2
    if min(x,y) == y:
        tmp = buf + abs(x-y) * a
    else:
        tmp = buf + abs(x-y) * b
    ans = min(buf2,tmp)
else:
    ans = x * a + y * b

print(ans)
