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