#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int cost = 0;
  int i = 0;
  int mini = 100000000;
  while (1) {
    int temp = 0;
    int p1 = x - i / 2;
    int p2 = y - i / 2;
    temp = temp + i * c;
    if (p1 < 0 && p2 < 0) break;
    if (p1 > 0) {
      temp += p1 * a;
    }
    if (p2 > 0) {
      temp += p2 * b;
    }
    if (mini > temp && temp != 0) mini = temp;
    i += 2;
  }
  cout << mini << endl;
}
