#include <bits/stdc++.h>
using namespace std;
int a, b, c, xx, yy, rs;
int main() {
  cin >> a >> b >> c >> xx >> yy;
  if (a + b < c) {
    rs = xx * a + yy * b;
  } else {
    if (xx > yy) {
      rs = c * yy + (xx - yy) * a;
    } else
      rs = c * xx + (yy - xx) * b;
  }
  cout << rs << endl;
}
