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