#include <bits/stdc++.h>
int main() {
  int i, j, k;
  int A, B, C, X, Y, N, count;
  char line[512];
  fgets(line, sizeof(line), stdin);
  sscanf(line, "%d %d %d %d %d", &A, &B, &C, &X, &Y);
  int tmp;
  if (X < Y) {
    X = tmp;
    X = Y;
    Y = tmp;
  }
  int ans = 0;
  if (A + B < 2 * C) {
    ans = Y * (A + B);
  } else {
    ans = Y * 2 * C;
  }
  if (A < 2 * C) {
    printf("%d", ans + (X - Y) * A);
    return 0;
  } else {
    printf("%d", ans + (X - Y) * 2 * C);
    return 0;
  }
}
