#include <bits/stdc++.h>
#pragma warning(disable : 4996)
int i_dsort(const void* a, const void* b);
int i_asort(const void* a, const void* b);
int _gcd(int a, int b);
int _swp(int* a, int* b);
int _cknum(char* a, int n);
int _atoi(char* s, int len);
int s_asort(const void* a, const void* b);
int s_dsort(const void* a, const void* b);
int s_asort(const void* a, const void* b) {
  return (strcmp((char*)a, (char*)b));
}
int s_dsort(const void* a, const void* b) {
  return (strcmp((char*)b, (char*)a));
}
int i_dsort(const void* a, const void* b) { return (*(int*)b - *(int*)a); }
int i_asort(const void* a, const void* b) { return (*(int*)a - *(int*)b); }
int _gcd(int a, int b) {
  int r, tmp;
  if (a < b) {
    tmp = a;
    a = b;
    b = tmp;
  }
  r = a % b;
  while (r) {
    if (!r) break;
    a = b;
    b = r;
    r = a % b;
  }
  return (b);
}
int _swp(int* a, int* b) {
  int tmp;
  tmp = *b;
  *b = *a;
  *a = tmp;
  return 0;
}
int _cknum(char* a, int n) {
  int i;
  char t = '0';
  for (i = 0; i < n; i++) {
    if (a[i] < '0' || a[i] > '9') return 1;
  }
  return 0;
}
int _atoi(char* s, int len) {
  char tmp[20];
  memcpy(tmp, s, len);
  tmp[len] = 0x00;
  return (atoi(tmp));
}
long long _pfact(long long a);
static long long pf[100000000];
static long long pc;
long long _pfact(long long a) {
  long i, r;
  if (a % 2 == 0) {
    pf[pc] = 2;
    pc++;
    return (_pfact(a / 2));
  }
  r = sqrt(a);
  for (i = 3; i <= r; i += 2) {
    if (a % i == 0) {
      pf[pc] = i;
      pc++;
      return (_pfact(a / i));
    }
  }
  if (a != 1) {
    pf[pc] = a;
    pc++;
  }
  return 0;
}
int main(void) {
  int a, b, c, x, y;
  long ans = 0;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  if (a * x > 2 * c * x && b * y > 2 * c * y) {
    printf("%ld\n", 2 * (long)c * (long)((x < y) ? y : x));
    return 0;
  }
  if ((2 * c - a) < b)
    ans = 2 * c * y + a * ((x - y < 0) ? 0 : x - y);
  else if ((2 * c - b) < a)
    ans = 2 * c * x + b * ((y - x < 0) ? 0 : y - x);
  else
    ans = a * x + b * y;
  printf("%ld\n", ans);
  return 0;
}
