#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
long long gcd(long long x, long long y) {
  if (x % y == 0) return y;
  return gcd(y, x % y);
}
int main(void) {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  if (a > c && b > c) {
    ans += max(x, y) * 2 * c;
  } else if (a + b > 2 * c) {
    int num = min(x, y);
    ans += num * 2 * c;
    x -= num;
    y -= num;
    ans += a * x + b * y;
  } else {
    ans += a * x + b * y;
  }
  cout << ans << endl;
  return 0;
}
