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