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