#include <bits/stdc++.h>
using namespace std;
int n, nn[101], x, dp[100005];
int main() {
  int a, b, c, x, y;
  int ans = 0;
  cin >> a >> b >> c >> x >> y;
  if (a + b > 2 * c) {
    int temp = min(x, y);
    x -= temp;
    y -= temp;
    ans += (temp * c * 2);
    if (a > 2 * c) {
      ans += (x * 2 * c);
    } else
      ans += (x * a);
    if (b > 2 * c) {
      ans += (y * 2 * c);
    } else
      ans += (y * a);
  } else {
    ans += (a * x + b * y);
  }
  cout << ans << endl;
}
