A, B, C, X, Y = (int(i) for i in input().split())  

min = min(X, Y)
max = max(X, Y)

if A + B > 2 * C :
    if A > 2 * C :
        print(min * 2 * C + (max-min) * C * 2)
    else:
        print(min * 2 * C + (max-min) * A)
else:
    print(A * X + B * Y)
