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