#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  while (~scanf("%d%d%d", &a, &b, &c)) {
    int x, y, sum, con;
    scanf("%d%d", &x, &y);
    int con1, con2, con3, con4;
    con4 = a * x + b * y;
    con1 = a * x + b * y;
    if (x > y)
      con2 = 2 * y * c + (x - y) * a;
    else
      con2 = 2 * x * c + (y - x) * a;
    con = (x > y ? x : y);
    con3 = 2 * con * c;
    con = con1 < con2 ? con1 : con2;
    sum = con < con3 ? con : con3;
    sum = sum < con4 ? sum : con4;
    printf("%d\n", sum);
  }
  return 0;
}
