#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MAX = 510000;
const int INF = 1e9;
const double pi = acos(-1);
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  if (x == y) {
    ans = min(a * x + b * y, x * 2 * c);
  }
  if (x > y) {
    ans = min((a + b) * y, y * 2 * c);
    x -= y;
    ans += min(a * x, x * 2 * c);
  }
  if (x < y) {
    ans = min((a + b) * x, x * 2 * c);
    y -= x;
    ans += min(b * y, y * 2 * c);
  }
  cout << ans << endl;
  return 0;
}
