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