#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  int p = 0;
  cin >> a >> b >> c >> x >> y;
  int z = x > y ? y : x;
  if (a > c * 2 && b > c * 2) {
    p = (x > y ? x : y) * c * 2;
  } else {
    if (a + b < c * 2) {
      p += (a + b) * z;
      y -= z;
      x -= z;
    } else {
      p += c * 2 * z;
      y -= z;
      x -= z;
    }
    if (x) {
      if (a < c * 2)
        p += a * x;
      else
        p += c * 2 * x;
    } else if (y) {
      if (b < c * 2)
        p += b * x;
      else
        p += c * 2 * x;
    }
  }
  cout << p << endl;
}
