#!/usr/bin/env python3

a, b, c, x, y = map(int, input().split())

total = 0
if a + b >= 2 * c:
    # A, Bセットを買う方が得
    if x > y:
        total += 2 * c * y
        rest = x - y
        if b >= 2 * c:
            # Aの残りもA, Bセットを買う方が得
            total += 2 * c * rest
        else:
            total += a * rest
    elif x < y:
        total += 2 * c * x
        rest = y - x
        if a >= 2 * c:
            # Bの残りもA, Bセットを買う方が得
            total += 2 * c * rest
        else:
            total += b * rest
    else:
        # x == y
        total += 2 * c * x
else:
    # a + b < 2 * c
    # A, Bそれぞれ買う方が得
    total += a * x + b * y

print(total)
