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

if (a+b)/2 > c:
    if c*max(x, y)*2 < (a*x + b*y):
        print(c*max(x, y)*2)
    else:
        tmp = min(x, y)
        print(c*tmp*2 + a*max(x-tmp, 0) + b*max(y-tmp, 0))
else:
    print(a*x + b*y)