def solve(string):
    a, b, c, x, y = map(int, string.split())
    if a + b <= 2 * c:
        return str(a * x + b * y)
    if 2 * c <= a and 2 * c <= b:
        return str(2 * c * max(x, y))
    if 2 * c <= a:
        return str(2 * c * x + b * max(0, y - x))
    return str(2 * c * y + a * max(0, x - y))


if __name__ == '__main__':
    print(solve(input()))
