#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);
    if (a > c && b > c) {
      con = (x > y ? x : y);
      sum = 2 * con * c;
    } else {
      int con1, con2;
      con1 = a * x + b * y;
      if (x > y)
        con2 = 2 * y * c + (x - y) * a;
      else
        con2 = 2 * x * c + (y - x) * a;
      sum = con1 < con2 ? con1 : con2;
    }
    printf("%d\n", sum);
  }
  return 0;
}
