#include <bits/stdc++.h>
using namespace std;
unsigned long f(unsigned long a, unsigned long b) {
  unsigned long ct = 0;
  while (a | b) {
    a /= 10;
    b /= 10;
    ct++;
  }
  return ct;
}
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = INFINITY;
  if (a > 2 * c) {
    if (b > 2 * c) {
      ans = c * 2 * max(x, y);
    } else {
      ans = c * 2 * x + b * max(0, x - y);
    }
  } else if (b > 2 * c) {
    ans = c * 2 * y + a * max(0, y - x);
  } else if (a + b > c * 2) {
    ans = c * 2 * min(x, y) + (x < y ? b * (y - x) : a * (x - y));
  } else {
    ans = a * x + b * y;
  }
  cout << ans << endl;
  return 0;
}
