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