#include <bits/stdc++.h>
using namespace std;
const int long long MOD = 1000000007;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  c *= 2;
  int ans = 0;
  if (y >= x) {
    int tmp;
    tmp = x;
    x = y;
    y = tmp;
    tmp = a;
    a = b;
    b = tmp;
  }
  if (a + b > c) {
    ans += c * y;
    x -= y;
    y = 0;
    if (x > c) {
      ans += c * x;
    } else {
      ans += a * x;
    }
  } else {
    ans += a * x + b * y;
  }
  cout << ans << endl;
  return 0;
}
