#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y, sum, mon = 0;
  cin >> a >> b >> c >> x >> y;
  sum = a / 2 + b / 2;
  if (sum < c)
    printf("%d", a * x + b * y);
  else {
    if (x < y) {
      mon += x * 2 * c;
      if (b < c)
        mon += b * (y - x);
      else
        mon += c * (y - x) * 2;
    } else {
      mon += y * 2 * c;
      if (a < c)
        mon += a * (x - y);
      else
        mon += c * (x - y);
    }
    printf("%d", mon);
  }
  return 0;
}
