CodeEff/ECCO huggingface dataset:
# Original solution
print((eval(input().replace(' ','*'))))

# Optimized solution
print((eval(input().replace(*' *'))))
# Original solution
print((eval(input().replace(' ','*'))))


# Optimized solution
def solve():
    print((eval(input().replace(' ', '*'))))


if __name__ == '__main__':
    solve()
# Original solution
#169
#値 A×Bを整数として出力せよ
#入力
a, b = list(map(int, input().split()))
#print(a,b)

#処理
answer=a*b

#結果
print(answer)

# Optimized solution
A, B = list(map(int, input().split()))
print((A*B))
# Original solution
# 169A
# A * Bを整数として出力

# 1.入力をプログラムで扱えるように受け取る
a, b = list(map(int, input().split()))
# print(a, b)

# 2.受け取った入力値を使って、適切に処理（計算）すること
answer = a * b

# 3.計算した結果を出力すること
print(answer)

# Optimized solution
# 入力をプログラムで扱えるようにする
a, b = list(map(int, input().split()))

# 受け取った値使って計算　　　　　
answer = a * b

# 結果の出力
print(answer)
# Original solution
a, b = (int(x) for x in input().split())
print((a * b))

# Optimized solution
a, b = list(map(int, input().split()))
print((a*b))
# Original solution
# 169A

#1.入力をちゃんと受け取ること
#ex：｢2 5」⇒ a = 2,  b = 5　みたいにしないといけない。
a, b = list(map(int, input().split()))
#print(a)
#print(b)

#2.目的通りの計算をする
#ex：２つの整数ＡとＢの掛け算をやる
answer = a * b

#3.計算の結果を出力する
print(answer)

# Optimized solution
a, b = list(map(int, input().split()))
answer = a * b
print(answer)
# Original solution
A, B = list(map(int, input().split()))

print((A*B))

# Optimized solution
print((eval(input().replace(' ','*'))))
# Original solution
A, B = list(map(int, input().split()))
print((A*B))

# Optimized solution
a, b = list(map(int, input().split()))
print((a*b))
# Original solution
a, b = list(map(int, input().split()))

answer = a * b

print(answer)

# Optimized solution
# 入力（スペースで区切って入力）
a,b = list(map(int,input().split()))

# 掛け算をする
print(( a * b ))
# Original solution
from sys import stdin
A, B = list(map(float,input().split()))

result = int(A * B)

print(result)

# Optimized solution
A, B = list(map(float,input().split()))

result = int(A * B)

print(result)
# Original solution
A, B = list(map(float,input().split()))

result = int(A * B)

print(result)

# Optimized solution
x, y = list(map(int, input().split()))

result = x * y 

print(result)
# Original solution
# coding: utf-8

A, B, C, X, Y = list(map(int, input().split()))
pt1 =(A*X)+(B*Y)
pt2 = 2*C*max(X,Y)
pt3 = 2*C*min(X,Y)+((A*(X-Y)) if X>Y else B*(Y-X))

print((min(pt1,pt2,pt3)))

# Optimized solution
# coding: utf-8
A, B, C, X, Y = list(map(int, input().split()))
print((min((A*X)+(B*Y),2*C*max(X,Y),2*C*min(X,Y)+((A*(X-Y)) if X>Y else B*(Y-X)))))
# Original solution
a,b,c,x,y = list(map(int,input().split()))
price = 10**10
for k in range(10**5+1):
    re = 2*c*k + max(0,x-k)*a + max(0,y-k)*b
    price = min(re,price)
print(price)

# Optimized solution
a,b,c,x,y = list(map(int,input().split()))
a1 = a*x + b*y
a2 = max(x,y) * 2*c
if y >= x:
    a3 = 2*c*x + (y-x)*b
else:
    a3 = 2*c*y + (x-y)*a
print((min(a1,a2,a3)))
# Original solution
# -*- coding: utf-8 -*-

A, B, C, X, Y = list(map(int, input().split()))

cost = int(1e10)
for num_ac in range(0, int(1e5) + 1):
    num_A = max(0, X - num_ac)
    num_B = max(0, Y - num_ac)
    c = 2 * C * num_ac + A * num_A + B * num_B
    cost = min(c, cost)
print(cost)

# Optimized solution
A, B, C, X, Y = list(map(int, input().split()))

ans = 0
if A + B > 2 * C:
    z = min(X, Y)
    X -= z
    Y -= z
    ans += 2 * z * C

# 偏り分
if 2 * C < A:
    k = X
    X -= k
    Y -= k
    ans += 2 * C * k
if 2 * C < B:
    k = Y
    X -= k
    Y -= k
    ans += 2 * C * k

# あまり分
ans += A * max(0, X) + B * max(0, Y)
print(ans)
# Original solution
a, b, c, x, y = list(map(int, input().split()))

ans = float('inf')

for i in range(2 * 10**5 + 1):
    ans = min(ans, a * max(x - i, 0) + b * max(y - i, 0) + 2 * c * i)

print(ans)

# Optimized solution
A,B,C,X,Y = list(map(int,input().split()))
min_xy = min(X,Y)
max_xy = max(X,Y)
ans1 = 2 * C * min_xy + A * (X-min_xy) + B * (Y-min_xy) # 無駄にならない範囲でABピザを買い、残りを買う
ans2 = A*X + B*Y # ABピザを買わない
ans3 = 2 * C * max_xy # ABピザだけを買う
print((min(ans1,ans2,ans3)))
# Original solution
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    import math
    a,b,c,x,y=list(map(int, input().split()))
    cmax=max(x,y)*2
    l=[]
    for i in range(cmax+1):
        amai = max(math.ceil(x - 0.5 * i),0)
        bmai = max(math.ceil(y - 0.5 * i),0)
        l.append(amai*a+bmai*b+i*c)
    print((min(l)))
resolve()

# Optimized solution
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    import math
    a,b,c,x,y=list(map(int, input().split()))
    # ABピザを奇数枚買っても1枚無駄になるから、ABピザは2枚を1枚だと考える
    # cの値段を2倍にして枚数を半分に
    cmax=max(x,y) # ABピザの最大枚数(2枚を1枚と考えたとき)
    c=2*c
    l=[]
    for i in range(cmax+1):
        amai = max(x - i,0)
        bmai = max(y - i,0)
        l.append(amai*a+bmai*b+i*c)
    print((min(l)))
resolve()
# Original solution
a, b, c, x, y = list(map(int, input().split()))
mi = 10**10
for i in range(10**6):
    cost = c*2*i + a*max((x-i), 0) + b*max((y-i), 0)
    if cost < mi:
        mi = cost

print(mi)

# Optimized solution
a, b, c, x, y = list(map(int, input().split()))
if x > y:
    cost = min(a*x + b*y, x*c*2, y*c*2 + (x-y)*a)
else:
    cost = min(a*x + b*y, y*c*2, x*c*2 + (y-x)*b)

print(cost)
# Original solution
A,B,C,X,Y=list(map(int,input().split()))
#AB 
M=max(2*X,2*Y)
ans=10**9
for i in range(0,M+2,2):
    temp=i*C+max(0,X-(i//2))*A+max(0,Y-(i//2))*B
    ans=min(ans,temp)
print(ans)
    

# Optimized solution
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from heapq import heapify, heappop, heappush
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(eval(input()))
def MAP(): return list(map(int, input().split()))
def S_MAP(): return list(map(str, input().split()))
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B, C, X, Y = MAP()

ans = INF

ma = max(X, Y)
t = ma * C * 2
ans = A * X + B * Y
# print(ans, t)
# exit()
mi = min(X, Y)
mi_X = X - mi
mi_Y = Y - mi
tmp = mi_X * A + mi_Y * B + C * mi * 2
ans = min(ans, tmp, t)
print(ans)
exit()

# for i in range():
# print(ans)
for i in range(min(X, Y) + 1):
    tmp = A * (X - i) + B * (Y - i) + C * 2 * i
    print(tmp)
    ans = min(tmp, ans)
print(ans)




# i = 0
# new = 0
# while new < ans:
#     new = A * (X - i) + B * (Y - i) + C * 2 * i
#     ans = min(ans, new)
#     print(ans)
#     i += 1
# print(ans)
    # if new < ans:
    #     ans = new
    #     i += 1
    # else:
    #     print(ans)
    #     break
# Original solution

def cmd():
    A, B, C, X, Y = list(map(int, input().split()))
    buyAB = A*X + B*Y
    if X == Y:
        buyminC = C*2*min(X,Y)
    elif X > Y:
        buyminC = C*2*min(X,Y) + A*(X-Y)
    else:
        buyminC = C*2*min(X,Y) + B*(Y-X)
    buymaxC = C*2*max(X,Y)
    #print("buyAB:{}, buyminC:{}, buymaxC:{}".format(buyAB, buyminC, buymaxC))
    print((min(buyAB, buyminC, buymaxC)))

if __name__ == "__main__":
    cmd()


# Optimized solution

def main():
    A, B, C, X, Y = list(map(int, input().split()))
    M1 = A*X + B*Y
    M2 = C*2*min(X, Y) + (Y >= X) * (Y - X) * B + (X > Y) * (X - Y) * A
    M3 = C*2*max(X, Y)
    ans = min(M1, M2, M3)
    print(ans)


if __name__ == "__main__":
    main()
# Original solution
# AtCoder Beginner Contest 095 C - Half and Half
import sys

A, B, C, X, Y = list(map(int, sys.stdin.readline().strip().split()))

ans = A * X + B * Y
for z in range(2, 2 * 10 ** 5 + 1, 2):
    x = max(X - int(z / 2), 0)
    y = max(Y - int(z / 2), 0)

    price = A * x + B * y + C * z
    ans = min(price, ans)

print(ans)


# Optimized solution
# AtCoder Beginner Contest 095 C - Half and Half
import sys

A, B, C, X, Y = list(map(int, sys.stdin.readline().strip().split()))

"""
ans = A * X + B * Y
for z in range(2, 2 * 10 ** 5 + 1, 2):
    x = max(X - int(z / 2), 0)
    y = max(Y - int(z / 2), 0)

    price = A * x + B * y + C * z
    ans = min(price, ans)

print(ans)
"""

price1 = A * X + B * Y
price2 = C * 2 * X + B * max(Y - X, 0)
price3 = A * max(X - Y, 0) + C * 2 * Y
print((min(price1, price2, price3)))
# Original solution
A, B, C, X, Y = list(map(int, input().split()))

if A + B < 2 * C:
    print((A * X + B * Y))
else:  # ABピザを二枚ずつ増やしていく。最大は2(max(x,y))
    ans = float('inf')
    for i in range(0, max(X, Y) * 2 + 1, 2):
        ans = min(ans, max(A * (X - i // 2), 0) + max(B * (Y - i // 2), 0) + C * i)
    print(ans)


# Optimized solution
def solve():
    A,B,C,X,Y = list(map(int, input().split()))
    ans = X*A + Y*B
    for i in range(max(X,Y)+1):
        aandb = A * max(0, X-i) + B * max(0, Y-i)
        ab = 2*C*i
        ans = min(ans, aandb + ab)
    print(ans)

if __name__ == '__main__':
    solve()
# Original solution
# C - Half and Half

A, B, C, X, Y = list(map(int, input().split()))

# 条件を満たすときのA, B, ABの買い方を全列挙したい
# A, Bの枚数は、ABの値が決まれば、一意に定まるため、
# ABのみループする。

ans = 10**18
for i in range(0, max(X, Y)*2+1, 2):
    x = max(X-i//2, 0)
    y = max(Y-i//2, 0)
    ans = min(ans, x*A + y*B + i*C)
    
print(ans)

# Optimized solution
A, B, C, X, Y = list(map(int, input().split()))

ans = 10**18
for i in range(0, 2*max(X, Y)+2, 2):
    ans = min(ans, i * C + max(X-(i//2), 0) * A + max(Y-(i//2), 0) * B)
print(ans)
# Original solution
ans = 0
A, B, AB, X, Y = list(map(int, input().split()))
AB = min(AB * 2, A + B)
m = min(X, Y)
ans += m * AB
X -= m
Y -= m
if X == 0:
    ans += min(B, AB) * Y
else:
    ans += min(A, AB) * X
print(ans)

# Optimized solution
a, b, c, x, y = list(map(int, input().split()))
if a + b <= c * 2:
    print((a * x + b * y))
else:
    if x <= y:
        print((c * min(x, y) * 2 + abs(x - y) * min(b, c * 2)))
    else:
        print((c * min(x, y) * 2 + abs(x - y) * min(a, c * 2)))
# Original solution
a, b, c, x, y = list(map(int, input().split()))

def f(x,y):
    return x-y if x>y else 0

if (a+b) > 2*c:
    ans = min(2*c*x + f(y,x)*b, 2*c*y + f(x,y)*a)
else:
    ans = a*x + b*y

print(ans)    

# Optimized solution
a, b, c, x, y = list(map(int, input().split()))

def f(x,y):
    return x-y if x>y else 0

print((min(2*c*x + f(y,x)*b, 2*c*y + f(x,y)*a, a*x+b*y)))
# Original solution
A,B,C,X,Y = list(map(int,input().split()))
l = []
for i in range(max(X,Y)+1):
    T = i * C * 2
    if i < X: 
        T += (X-i)*A
    if i < Y:
        T += (Y-i)*B
    l.append(T)
l.sort()
print((l[0]))

# Optimized solution
A,B,C,X,Y = list(map(int,input().split()))
ans = 0
if 2*C <= A+B:
    Z = min(X,Y)
    ans = 2*C*Z
    X -= Z
    Y -= Z
ans += min(2*C*X,A*X)
ans += min(2*C*Y,B*Y)
print(ans)
# Original solution
def check():
    A, B, C, X, Y = [int(i) for i in input().split(' ')]
    if X > 0 and Y > 0:
        if 2*C < A+B:
            if X > Y:
                total = Y*2*C
                price = min(A, 2*C)
                total += (X-Y)*price
            else:
                total = X*2*C
                price = min(B, 2*C)
                total += (Y-X)*price
        else:
            total = A*X + B*Y
    elif X == 0:
        price = min(B, 2*C)
        total = price*Y
    else:
        price = min(A, 2*C)
        total = price*X
        
    print(total)
check()

# Optimized solution
def solve():
    A, B, C, X, Y = list(map(int, input().split()))

    x1 = min(X, Y)
    price = min((A+B) * x1, 2 * C * x1)
    x2 = max(X, Y) - x1
    a = A if X > Y else B
    price += min(a * x2, 2 * C * x2)
    print(price)
solve()
# Original solution
a, b, c, x, y = list(map(int, input().split()))

ans = float('inf')
for i in range(10**5 + 1):
    tmp = c*2*i + max(0, x-i) * a + max(0, y-i) * b
    ans = min(ans, tmp)

print(ans)

# Optimized solution
a, b, c, x, y = list(map(int, input().split()))

ans = float('inf')
for i in range(max(x, y) + 1):
    tmp = c*2*i + max(0, x-i) * a + max(0, y-i) * b
    ans = min(ans, tmp)

print(ans)
# Original solution
a, b, c, x, y = list(map(int,input().split()))

price = a * x + b * y
for i in range(max(x,y)+1):
    new_price = c * 2 * i + max(a * (x - i),0) + max(b * (y - i),0)
    price = min(price,new_price)

print(price)

# Optimized solution
a, b, c, x, y = list(map(int,input().split()))

price = a * x + b * y
for i in range(max(x,y)+1):
    price = min(price,c * 2 * i + max(a * (x - i),0) + max(b * (y - i),0))

print(price)
# Original solution
A, B, C, X, Y = list(map(int, input().split()))

"""
ABピザの購入数(0~2 * max(X, Y)で全探索)
"""
min_price = 10 ** 10
for i in range(2 * max(X, Y) + 1):
    c_price = C * i
    a_price = A * max(0, (X - i//2))
    b_price = B * max(0, (Y - i//2))
    min_price = min(min_price, a_price+b_price+c_price)
print(min_price)


# Optimized solution
a, b, c, x, y = list(map(int, input().split()))

ans = 10 ** 18
for i in range(0, 2 * max(x, y) + 1, 2):
    tmp = i * c
    if x - i // 2 > 0:
        tmp += (x - i // 2) * a
    if y - i // 2 > 0:
        tmp += (y - i // 2) * b
    ans = min(ans, tmp)
print(ans)
# Original solution
a,b,c,x,y=list(map(int,input().split()))
ans=float('inf')
for i in range(10**5+1):
    temp=i*2*c + max(0,x-i)*a +max(0,y-i)*b
    ans=min(ans,temp)
print(ans)

# Optimized solution
a,b,c,x,y=list(map(int,input().split()))
ans=float('inf')
for i in range(10**5+1):
    tmp=i*c*2+a*max(x-i,0)+b*max(y-i,0)
    ans=min(ans,tmp)
print(ans)
# Original solution
a,b,c,x,y=list(map(int,input().split()))

ans=a*x+b*y
for ci in range(max(x,y)+1):
    sumc = 2*ci*c
    sumc += (x-ci)*a if (x-ci)>0 else 0
    sumc += (y-ci)*b if (y-ci)>0 else 0
    ans=min(ans,sumc)

print(ans)

# Optimized solution
a,b,c,x,y=list(map(int,input().split()))
ans=a*x+b*y
if x==y:
    ans=min(ans,2*x*c)
elif x>y:
    ans=min(ans,a*(x-y)+2*y*c)
    ans=min(ans,2*x*c)
else:
    ans=min(ans,b*(y-x)+2*x*c)
    ans=min(ans,2*y*c)
print(ans)
# Original solution
#                         author:  kagemeka 
#                         created: 2019-11-07 12:33:44(JST)
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics
# import functools
# import operator

def main():
    a, b, c, x, y = (int(i) for i in sys.stdin.readline().split())
    if a + b <= c * 2:
        cost = a * x + b * y
    elif x >= y:
        atleast = y
        cost = c * atleast * 2
        remainder = x - atleast
        if a <= c * 2:
            cost += a * remainder
        else:
            cost += c * remainder * 2
    else:
        atleast = x
        cost = c * atleast * 2
        remainder = y - atleast
        if b <= c * 2:
            cost += b * remainder
        else:
            cost += c * remainder * 2 
    
    print(cost)
    
if __name__ == "__main__":
    # execute only if run as a script
    main()


# Optimized solution
import sys

a, b, c, x, y = list(map(int, sys.stdin.readline().split()))

if x < y:
    x, y = y, x
    a, b = b, a

def main():

    if a + b <= c * 2:
        cost = a * x + b * y
    else:
        cost = c * 2 * y
        if a <= c * 2:
            cost += a * (x - y)
        else:
            cost += c * 2 * (x - y)
    return cost

if __name__ == '__main__':
    ans = main()
    print(ans)
# Original solution
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

A, B, C, X, Y = list(map(int, input().split()))

ans = 0
if X >= Y:
    ans = min(A*X+B*Y, C*(Y)*2+A*(X-Y))
else:
    ans = min(A*X+B*Y, C*(X)*2+B*(Y-X))


ans = min(ans, C*max(X, Y)*2)
print(ans)


# Optimized solution
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

i_i = lambda: int(i_s())
i_l = lambda: list(map(int, stdin.readline().split()))
i_s = lambda: stdin.readline().rstrip()

A, B, C, X, Y = i_l()

if X < Y:
    X * C + (Y - X) * B
    print((min((X * A + Y * B), (X * C * 2 + (Y - X) * B), C * max(X, Y) * 2)))
else:
    print((min((X * A + Y * B), (Y * C * 2 + (X - Y) * A), C * max(X, Y) * 2)))
# Original solution
A,B,C,X,Y = list(map(int,input().split()))
Ans = 0
Z = min(X,Y)
if A+B < C*2:
    Ans = A*X+B*Y
else:
    Ans = min(C*2*Z + A*(X-Z) + B*(Y-Z), C*2*max(X,Y))

print(Ans)

# Optimized solution
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
A,B,C,X,Y = list(map(int,input().split()))

ans = 0

Z = min(X,Y)
if A+B >= C*2:
    ans = min(C*Z*2 + A*(X-Z) + B*(Y-Z), C*max(X,Y)*2)
else:
    ans = A*X + B*Y

print(ans)
# Original solution
a,b,c,x,y = list(map(int,input().split()))

res = 0
res += min(a+b,2*c)*min(x,y)
if x >= y:
    res += min(2*c*(x-y),a*(x-y))
else:
    res += min(2*c*(y-x),b*(y-x))

print(res)

# Optimized solution
A,B,C,X,Y = list(map(int,input().split()))
res = min(A+B,2*C)*min(X,Y)
if X >= Y:
    res += min(A,2*C)*(X-Y)
else:
    res += min(B,2*C)*(Y-X)
print(res)
# Original solution
A, B, C, X, Y = list(map(int, input().split()))

# xn, yn = 0, 0
# price = 0
# 
# if (A+B) >= 2*C and A >= 1 and B >= 1:
#     ammount = min(X, Y)
#     price += C * ammount * 2
#     xn += ammount
#     yn += ammount
# 
# if A >= 2*C and X > xn:
#     ammount = X - xn
#     price += C * X * 2
#     xn += X
#     yn += X
# 
# if B >= 2*C and Y > yn:
#     ammount = Y - yn
#     price += C * ammount * 2
#     xn += ammount
#     yn += ammount
# 
# price += A * (X - xn)
# price += B * (Y - yn)
# 
# print(price)
# 

min_price = 1 << 32 
for i in range(max(X, Y)+1):
    xn, yn = i, i
    price = (2*C) * i
    price += (max(0, X - xn)) * A
    price += (max(0, Y - yn)) * B
    min_price = min(min_price, price)

print(min_price)

# Optimized solution
A, B, C, X, Y = list(map(int, input().split()))

xn, yn = 0, 0
price = 0

if A >= 2*C and X > xn:
    ammount = X - xn
    price += C * X * 2
    xn += X
    yn += X

if B >= 2*C and Y > yn:
    ammount = Y - yn
    price += C * ammount * 2
    xn += ammount
    yn += ammount

if (A+B) >= 2*C and (X - xn) >= 1 and (Y - yn) >= 1:
    ammount = min(X, Y)
    price += C * ammount * 2
    xn += ammount
    yn += ammount


if X - xn >= 1:
    price += A * (X - xn)

if Y - yn >= 1:
    price += B * (Y - yn)

print(price)


# min_price = 1 << 32 
# for i in range(max(X, Y)+1):
#     xn, yn = i, i
#     price = (2*C) * i
#     price += (max(0, X - xn)) * A
#     price += (max(0, Y - yn)) * B
#     min_price = min(min_price, price)
# 
# print(min_price)
# Original solution
# https://atcoder.jp/contests/abc095/tasks/arc096

# 値段,枚数
A, B, C, X, Y = list(map(int, input().split()))

ans = float("inf")
for i in range(10 ** 5 * 2):
    ans = min(ans, max(X - i, 0) * A + max(Y - i, 0) * B + 2 * i * C)

print(ans)


# Optimized solution
a, b, c, x, y = list(map(int, input().split()))

ans = float('inf')
for i in range(10 ** 5 + 1):
    price = i * 2 * c
    if x > i:
        price += a * (x - i)
    if y > i:
        price += b * (y - i)
    ans = min(ans, price)

print(ans)
# Original solution
a, b, c, x, y = list(map(int, input().split()))
# print(a, b, c, x, y)

ans = 10000 * (10 **5) + 7
c_max = 0
if x > y:
  c_max = x * 2
else:
  c_max = y * 2

for cc in range(c_max+1):
  ac = x - (cc // 2)
  bc = y - (cc // 2)
  
  if ac < 0:
    ac = 0
  if bc < 0:
    bc = 0
  price = ac * a + bc * b + cc * c
  # print('price: {}, ac: {}, bc: {}, cc: {}'.format(price, ac, bc, cc))
  ans = min(ans, price)

print(ans)

# Optimized solution
a, b, c, x, y = list(map(int, input().split()))
# print(a, b, c, x, y)

ans = 10000 * (10 **5) + 7
c_max = 0
if x > y:
  c_max = x * 2
else:
  c_max = y * 2

for cc in range(0, c_max+1, 2):
  ac = x - (cc // 2)
  bc = y - (cc // 2)
  
  if ac < 0:
    ac = 0
  if bc < 0:
    bc = 0
  price = ac * a + bc * b + cc * c
  # print('price: {}, ac: {}, bc: {}, cc: {}'.format(price, ac, bc, cc))
  ans = min(ans, price)

print(ans)
# Original solution
A, B, C, X, Y = list(map(int, input().split()))

MAX = max(X, Y)
MIN = 2*C*max(X, Y)
i = MAX
x=X
y=Y

while i > 0:
    tmpC = (MAX-i)*2*C
    total = (A*x)+(B*y)+tmpC
    if(MIN > total):
        MIN = total
    i-=1
    if(x!=0):
        x-=1
    if(y!=0):
        y-=1

print(MIN)


# Optimized solution

def myAnswer(A:int,B:int,C:int,X:int,Y:int) -> int:
   ans = 0
   both = C * 2
   AB=A+B
   while X!=0 or Y!=0:
      if(X>=1 and Y >=1):
         ans += min(AB,both)
         X-=1
         Y-=1
      elif(X>=1 and Y == 0):
         ans += min(both,A)
         X -= 1
      else:
         ans += min(both,B)
         Y -= 1
   return ans


def modelAnswer():
   tmp=1
def main():
   A,B,C,X,Y=list(map(int,input().split()))
   print((myAnswer(A,B,C,X,Y)))
if __name__ == '__main__':
   main()
# Original solution
def main():
    A, B, C, X, Y = (int(i) for i in input().split())
    ans1 = A * X + B * Y
    ans2 = 0
    ans3 = 0
    if X < Y:
        ans2 += 2 * C * X
        ans2 += B * (Y-X)
        ans3 += 2 * C * Y
    else:
        ans2 += 2 * C * Y
        ans2 += A * (X-Y)
        ans3 += 2 * C * X

    print((min(ans1,ans2,ans3)))

if __name__ == '__main__':
    main()

# Optimized solution
def main():
    a, b, c, x, y = (int(i) for i in input().split())
    ans = 0
    if x > y:
        p = (x - y)*a
    elif y > x:
        p = (y - x)*b
    else:
        p = 0
    print((min(a*x + b*y, 2*c*max(x, y), 2*c*min(x, y) + p)))


if __name__ == '__main__':
    main()
# Original solution
def main():
    a, b, c, x, y = (int(i) for i in input().split())
    ans = a*x + b*y
    ans = min(ans, 2*c*max(x, y))
    if x < y:
        d = y - x
        d *= b
    else:
        d = x - y
        d *= a
    ans = min(ans, 2*c*min(x, y)+d)
    print(ans)


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    a, b, c, x, y = (int(i) for i in input().split())
    v1 = 2*c*max(x, y)
    v2 = 2*c*min(x, y) + (y-x if x < y else x-y)*(b if x < y else a)
    v3 = a*x + b*y
    print((min(v1, v2, v3)))


if __name__ == '__main__':
    main()
# Original solution
A, B, C, X, Y = list(map(int, input().split()))
ans = float('inf')
for i in range(max(X,Y)+1):
    cost = 2 * C * i + max(0,X-i)*A +max(0,Y-i)*B
    ans = min(ans,cost)
print(ans)

# Optimized solution
A, B, C, X, Y = list(map(int, input().split()))
tmp = A*X + B*Y
if X >= Y:
    tmp = min(tmp,2*Y*C+(X-Y)*A)
else:
    tmp = min(tmp,2*X*C+(Y-X)*B)
tmp = min(tmp,max(X,Y)*2*C)
print(tmp)