#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y, a, b;
  cin >> A >> B >> C >> X >> Y;
  int min, max, money = 0;
  if (A + B < (C * 2)) {
    cout << A * X + B * Y;
  } else {
    if (X > Y) {
      min = Y;
      max = X;
      a = A;
      b = B;
    } else {
      min = X;
      max = Y;
      a = B;
      b = A;
    }
    while (1) {
      if (min - 1 < 0) break;
      money += C * 2;
      max -= 1;
      min -= 1;
    }
    cout << money + A * max + B * min;
  }
  return 0;
}
