#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  int double_c = c * 2;
  if (a + b > double_c) {
    int Min = 0;
    Min = min(x, y);
    if (x > y) {
      x = x - y;
      y = 0;
      if (x > double_c) {
        ans += x * double_c;
      } else {
        ans += x * a;
      }
    } else {
      y = y - x;
      x = 0;
      if (y > double_c) {
        ans += y * double_c;
      } else {
        ans += y * b;
      }
    }
    ans += double_c * Min;
    cout << ans << endl;
    return 0;
  } else {
    ans += x * a + y * b;
    cout << ans << endl;
    return 0;
  }
}
