#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const long long LINF = 1LL << 50;
const int NIL = -1;
const int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a + b <= 2 * c) {
    cout << a * x + b * y << '\n';
  } else {
    int ans = 2 * c * min(x, y);
    if (x <= y) {
      if (2 * b > 2 * c)
        ans += (y - x) * 2 * c;
      else
        ans += (y - x) * b;
    } else {
      if (2 * a > 2 * c)
        ans += (x - y) * 2 * c;
      else
        ans += (x - y) * a;
    }
    cout << ans << '\n';
  }
}
