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