#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y, r = 0;
  int mn = 99999;
  int optimal;
  scanf("%i %i %i %i %i", &a, &b, &c, &x, &y);
  if (2 * c <= a + b) {
    optimal = 2 * c;
  } else
    optimal = a + b;
  if (x < y) {
    r = optimal * x;
    if (b < 2 * c) {
      r += b * (y - x);
    } else {
      r += 2 * c * (y - x);
    }
  } else if (x > y) {
    r = optimal * y;
    if (a < 2 * c) {
      r += a * (x - y);
    } else {
      r += 2 * c * (x - y);
    }
  } else {
    printf("%i", optimal * y);
  }
  printf("%i", r);
  return 0;
}
