import numpy as np

A, B, C, X, Y = [int(i) for i in input().split()]
DP = np.zeros((X+1, Y+1))

for i in range(0, X + 1):
  for j in range(0, Y + 1):
    if i < 1:
      DP[i][j] = min(B * j, C * j * 2)
      continue
    if j < 1:
      DP[i][j] = min(A * i, C * i * 2)
      continue
    DP[i][j] = min(DP[i-1][j] + A, DP[i][j-1] + B, DP[i-1][j-1] + C * 2)

print(int(DP[X][Y]))
