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