#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, B, C, X, Y;
  int defo = 0;
  int loop = 0;
  int n = 0;
  int sum = 0;
  cin >> A;
  cin >> B;
  cin >> C;
  cin >> X;
  cin >> Y;
  defo = A * X + B * Y;
  if (X > Y)
    loop = X;
  else
    loop = Y;
  if (defo < loop * 2 * C) {
    sum = loop * 2 * C;
  } else {
    while (loop >= 0) {
      if (defo > loop * 2 * C) break;
      loop--;
    }
    sum += (X - loop) * A + (Y - loop) * B + (2 * C * loop);
  }
  if (defo < sum) {
    sum = defo;
  }
  cout << sum << endl;
}
