#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
int main(void) {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans;
  int mi = min(a, b);
  int ma = max(x, y);
  if (a + b > c * 2) {
    int m;
    if (mi == a) {
      m = y;
    } else {
      m = x;
    }
    ans = c * m * 2;
    int t;
    if (m == x) {
      t = (y - m) * b;
      ans += t;
    } else {
      t = (x - m) * a;
      ans += t;
    }
  } else {
    ans = x * a + y * b;
  }
  if (mi > c * 2) {
    ans = ma * 2 * c;
  }
  cout << ans << endl;
  return 0;
}
