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