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