#include <bits/stdc++.h>
using namespace std;
int main() {
  int A = 0;
  int B = 0;
  int C = 0;
  int X = 0;
  int Y = 0;
  int cost = 0;
  cin >> A >> B >> C >> X >> Y;
  if (C < (A + B) / 2) {
    if (X < Y) {
      cost += C * 2 * X;
      Y -= X;
      if (B > 2 * C)
        cost += 2 * Y * C;
      else
        cost += Y * B;
    } else {
      cost += C * 2 * Y;
      X -= Y;
      if (A > 2 * C)
        cost += 2 * X * C;
      else
        cost += X * A;
    }
  } else {
    cost = A * X + B * Y;
  }
  cout << cost;
}
