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