#!/usr/bin/env python
# -*- coding: utf-8 -*-
a,b,c,x,y = [int(i) for i in input().split()]

z = 0
min_price = a * x + b * y

while(True):
    if (x - z <= 0) and (y - z <= 0):
        break
    elif (x - z <= 0):
        sum_price = (y - z) * b + 2 * z * c
    elif (y - z <= 0):
        sum_price = (x - z) * a + 2 * z * c
    else:
        sum_price = (x - z) * a + (y - z) * b + 2 * z * c

    if sum_price < min_price:
        min_price = sum_price
    z += 1
    
print(min_price)
