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