#include <bits/stdc++.h>
int main(void) {
  int A, B, C, X, Y;
  scanf("%d%d%d%d%d", &A, &B, &C, &X, &Y);
  int min = X, max = Y;
  int judge = 0;
  if (X > Y) {
    max = X;
    min = Y;
    judge += 10;
  }
  int min_v = A, max_v = B;
  if (A > B) {
    max_v = A;
    min_v = B;
    judge += 1;
  }
  if (A + B < 2 * C) {
    printf("%d", A * X + B * Y);
  } else if (min_v >= 2 * C) {
    printf("%d", C * max);
  } else {
    int ans = 0;
    ans += C * 2 * min;
    switch (judge) {
      case 00:
        if (2 * C > B) {
          ans += (max - min) * B;
        } else {
          ans += (max - min) * 2 * C;
        }
        break;
      case 01:
        ans += (max - min) * A;
        break;
      case 10:
        ans += (max - min) * B;
        break;
      case 11:
        if (2 * C > A) {
          ans += (max - min) * A;
        } else {
          ans += (max - min) * 2 * C;
        }
        break;
    }
    printf("%d", ans);
  }
  return 0;
}
