#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  int b;
  cin >> b;
  int c;
  cin >> c;
  int x;
  cin >> x;
  int y;
  cin >> y;
  if (2 * c < (a + b)) {
    if (x < y) {
      int m = x % 2;
      int r = y - (x) + m;
      long long int e = (2 * (x - m) * c) + (m * a) + r * b;
      cout << e;
      return 0;
    } else if (x >= y) {
      int f = y % 2;
      int d = x - (y) + f;
      long long int l = (2 * (y - f) * c) + (f * b) + d * a;
      cout << l;
      return 0;
    }
  } else {
    long long int z = (x * a) + (y * b);
    cout << z;
    return 0;
  }
  return 0;
}
