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