#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  int ans[2];
  scanf("%d", &A);
  scanf("%d", &B);
  scanf("%d", &C);
  scanf("%d", &X);
  scanf("%d", &Y);
  int tmp = 0;
  if (X > Y) {
    ans[0] = (X - Y) * A;
    tmp = X;
    X = X - (X - Y);
  } else if (Y > X) {
    ans[0] = (Y - X) * B;
    tmp = Y;
    Y = Y - (Y - X);
  }
  if (X && Y) {
    int CM = C * (X * 2);
    int ABM = (A + B) * X;
    if (CM > ABM)
      ans[0] += ABM;
    else
      ans[0] += CM;
  }
  ans[1] = (tmp * 2) * C;
  if (ans[0] > ans[1]) {
    printf("%d\n", ans[1]);
  } else {
    printf("%d\n", ans[0]);
  }
}
