A, B, C, X, Y = map(int, input().split())

if (A + B) < C * 2:
    print(A * X + B * Y)
else:
    if X == Y:
        print(2 * C * (X + Y))
    elif X < Y:
        print(2*C * X + min(2*C, B) * (Y - X))
    else:
        print(2*C * Y + min(2*C, A) * (X - Y))