#include <bits/stdc++.h>
int max(int a, int b) { return a >= b ? a : b; }
int min(int a, int b) { return b >= a ? a : b; }
int factorial(int n) {
  if (n > 0)
    return n * factorial(n - 1);
  else
    return 1;
}
int compare_up_int(const void *a, const void *b) {
  return *(int *)a - *(int *)b;
}
int compare_down_int(const void *a, const void *b) {
  return *(int *)b - *(int *)a;
}
int euclid(int a, int b) {
  if (a < b) {
    int tmp = a;
    a = b;
    b = tmp;
  }
  int r = a % b;
  if (r < 0) r += b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
    if (r < 0) r += b;
  }
  return b;
}
int main() {
  int A, B, C, X, Y, count = 0, a, b;
  scanf("%d %d %d %d %d", &A, &B, &C, &X, &Y);
  if (A + B > 2 * C) {
    if (abs(A - B) < C) {
      if (X - min(X, Y) < 0) {
        a = 0;
      } else
        a = X - min(X, Y);
      if (Y - min(X, Y) < 0) {
        b = 0;
      } else
        b = Y - min(X, Y);
      printf("%d", (min(X, Y) * C * 2 + A * a + B * b));
      return 0;
    } else {
      if (X - max(X, Y) < 0) {
        a = 0;
      } else
        a = X - max(X, Y);
      if (Y - max(X, Y) < 0) {
        b = 0;
      } else
        b = Y - max(X, Y);
      printf("%d", (max(X, Y) * C * 2 + A * a + B * b));
      return 0;
    }
  }
  printf("%d", A * X + B * Y);
  return 0;
}
