#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
long long cnt = 0;
long long ans = 0;
int num;
long long mini = 999999999;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  for (long long i = 0; i <= max(x, y) * 2; i += 2) {
    ans = 0;
    ans += i * c;
    long long aa, bb;
    aa = x - i / 2;
    bb = y - i / 2;
    if (aa >= 0) {
      ans += aa * a;
    }
    if (bb >= 0) {
      ans += bb * b;
    }
    if (ans < mini) {
      mini = ans;
    }
  }
  cout << mini << endl;
}
