#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  int tmp, res = 0, res2 = 0;
  cin >> a >> b >> c >> x >> y;
  if (x >= y)
    tmp = y;
  else
    tmp = x;
  res += c * 2 * tmp;
  if (x >= y) {
    tmp = x - y;
    res += a * tmp;
  } else {
    tmp = y - x;
    res += b * tmp;
  }
  res2 += a * x;
  res2 += b * y;
  if (res > res2) res = res2;
  cout << res;
  return 0;
}
