#include <bits/stdc++.h>
int main() {
  int A, B, C, X, Y;
  while (1) {
    scanf("%d %d %d %d %d", &A, &B, &C, &X, &Y);
    if (A >= 1 && B >= 1 && C >= 1 && A <= 5000 && B <= 5000 && C <= 5000 &&
        X >= 1 && Y >= 1 && X <= 100000 && Y <= 100000)
      break;
  }
  int z = 0, zz = 0;
  if (X > Y) {
    z = (X - Y) * A;
    zz = 2 * C * Y;
  }
  if (Y > X) {
    z = (Y - X) * B;
    zz = 2 * C * X;
  }
  if (X == Y) {
    zz = C * (X + Y);
  }
  int a = z + zz;
  printf("%d", a);
  return 0;
}
