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