a, b, c, x, y = map(int, input().split())
if(a + b < 2 * c):
    print(a * x + b * y)
else:
    if(a >= 2 * c and b >= 2 * c):
        if(x > y):
            print(x * 2 * c)
        else:
            print(y * 2 * c)
    else:
        if(x > y):
            print(y * 2*c + (x - y) * a)
        else:
            print(x * 2*c + (y - x) * b)