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