A, B, C, X, Y = map(int, input().split())
faceAB = (A + B) / 2
if faceAB < C:
    print(X * A + Y * B)
elif 2 * C < A and 2 * C < B:
    print(2 * C * max(X, Y))
else:
    if X < Y:
        print(2 * C * min(X, Y) + ((Y - X) * B))
    else:
        print(2 * C * min(X, Y) + ((X - Y) * A))
