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