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