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