#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
const long long INF = 1LL << 60;
const double PI = 3.14159265358979323846;
const int NMAX = 100005;
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans = 0;
  if (a + b > c * 2) {
    int b = min(x, y);
    ans += c * 2 * b;
    x -= b;
    y -= b;
    if (x) {
      if (a * 2 > c * 2) {
        ans += c * 2 * x;
      } else {
        ans += a * x;
      }
    } else if (y) {
      if (b * 2 > c * 2) {
        ans += c * 2 * y;
      } else {
        ans += b * y;
      }
    }
  } else {
    ans += a * x;
    ans += b * y;
  }
  cout << ans << endl;
  return 0;
}
