from sys import stdin


def main():
    A, B, C, X, Y = [int(x) for x in stdin.readline().rstrip().split()]
    if A + B <= C * 2:
        print(A * X + B * Y)
    elif X < Y:
        a = C * 2 * X
        print(B * (Y - X) + a)
    else:
        a = C * 2 * Y
        print(A * (X - Y) + a)


if __name__ == '__main__':
    main()
