#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y, total = 0;
  scanf("%d%d%d%d%d", &a, &b, &c, &x, &y);
  if (x * y != 0) {
    if (2 * c < a + b) {
      int minval = min(x, y);
      x -= minval;
      y -= minval;
      total += 2 * c * minval;
    }
  }
  while (x != 0) {
    if (2 * c < a) {
      x--;
      total += 2 * c;
    } else
      total += a;
  }
  while (y != 0) {
    if (2 * c < b) {
      y--;
      total += 2 * c;
    } else
      total += b;
  }
  printf("%d", total);
  return 0;
}
