import java.util.*;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long A = sc.nextInt();
    long B = sc.nextInt();
    long C = sc.nextInt();
    long X = sc.nextInt();
    long Y = sc.nextInt();

    long ans;
    if (C*2 < A+B) {
      if (X > Y) {
        ans = (X-Y)*Math.min(A,C*2) + 2*Y*C;
      } else {
        ans = (Y-X)*Math.min(B,C*2) + 2*X*C;
      }
    } else {
      ans = A*X + B*Y;
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long A = sc.nextInt();
    long B = sc.nextInt();
    long C = sc.nextInt();
    long X = sc.nextInt();
    long Y = sc.nextInt();

    long ans;
    if (C*2 < A+B) {
      if (X > Y) {
        ans = (X-Y)*Math.min(A,C*2) + 2*Y*C;
      } else {
        ans = (Y-X)*Math.min(B,C*2) + 2*X*C;
      }
    } else {
      ans = A*X + B*Y;
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long A = sc.nextInt();
    long B = sc.nextInt();
    long C = sc.nextInt();
    long X = sc.nextInt();
    long Y = sc.nextInt();

    long ans;
    if (C*2 < A+B) {
      if (X > Y) {
        ans = (X-Y)*Math.min(A,C*2) + 2*Y*C;
      } else {
        ans = (Y-X)*Math.min(B,C*2) + 2*X*C;
      }
    } else {
      ans = A*X + B*Y;
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    long A = sc.nextInt();
    long B = sc.nextInt();
    long C = sc.nextInt();
    long X = sc.nextInt();
    long Y = sc.nextInt();

    long ans;
    if (C*2 < A+B) {
      if (X > Y) {
        ans = (X-Y)*Math.min(A,C*2) + 2*Y*C;
      } else {
        ans = (Y-X)*Math.min(B,C*2) + 2*X*C;
      }
    } else {
      ans = A*X + B*Y;
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long A = sc.nextInt(); A sc.nextInt() sc.nextInt sc long B = sc.nextInt(); B sc.nextInt() sc.nextInt sc long C = sc.nextInt(); C sc.nextInt() sc.nextInt sc long X = sc.nextInt(); X sc.nextInt() sc.nextInt sc long Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc long ans; ans if (C*2 < A+B) {
      if (X > Y) {
        ans = (X-Y)*Math.min(A,C*2) + 2*Y*C;
      } else {
        ans = (Y-X)*Math.min(B,C*2) + 2*X*C;
      }
    } else {
      ans = A*X + B*Y;
    } C*2 < A+B C*2 C 2 A+B A B {
      if (X > Y) {
        ans = (X-Y)*Math.min(A,C*2) + 2*Y*C;
      } else {
        ans = (Y-X)*Math.min(B,C*2) + 2*X*C;
      }
    } if (X > Y) {
        ans = (X-Y)*Math.min(A,C*2) + 2*Y*C;
      } else {
        ans = (Y-X)*Math.min(B,C*2) + 2*X*C;
      } X > Y X Y {
        ans = (X-Y)*Math.min(A,C*2) + 2*Y*C;
      } ans = (X-Y)*Math.min(A,C*2) + 2*Y*C ans (X-Y)*Math.min(A,C*2) + 2*Y*C (X-Y)*Math.min(A,C*2) (X-Y) X Y Math.min(A,C*2) Math.min Math A C*2 C 2 2*Y*C 2*Y*C 2 Y C {
        ans = (Y-X)*Math.min(B,C*2) + 2*X*C;
      } ans = (Y-X)*Math.min(B,C*2) + 2*X*C ans (Y-X)*Math.min(B,C*2) + 2*X*C (Y-X)*Math.min(B,C*2) (Y-X) Y X Math.min(B,C*2) Math.min Math B C*2 C 2 2*X*C 2*X*C 2 X C {
      ans = A*X + B*Y;
    } ans = A*X + B*Y ans A*X + B*Y A*X A X B*Y B Y System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long A = sc.nextInt();
    long B = sc.nextInt();
    long C = sc.nextInt();
    long X = sc.nextInt();
    long Y = sc.nextInt();

    long ans;
    if (C*2 < A+B) {
      if (X > Y) {
        ans = (X-Y)*Math.min(A,C*2) + 2*Y*C;
      } else {
        ans = (Y-X)*Math.min(B,C*2) + 2*X*C;
      }
    } else {
      ans = A*X + B*Y;
    }
    System.out.println(ans);
  }
} public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long A = sc.nextInt();
    long B = sc.nextInt();
    long C = sc.nextInt();
    long X = sc.nextInt();
    long Y = sc.nextInt();

    long ans;
    if (C*2 < A+B) {
      if (X > Y) {
        ans = (X-Y)*Math.min(A,C*2) + 2*Y*C;
      } else {
        ans = (Y-X)*Math.min(B,C*2) + 2*X*C;
      }
    } else {
      ans = A*X + B*Y;
    }
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long A = sc.nextInt();
    long B = sc.nextInt();
    long C = sc.nextInt();
    long X = sc.nextInt();
    long Y = sc.nextInt();

    long ans;
    if (C*2 < A+B) {
      if (X > Y) {
        ans = (X-Y)*Math.min(A,C*2) + 2*Y*C;
      } else {
        ans = (Y-X)*Math.min(B,C*2) + 2*X*C;
      }
    } else {
      ans = A*X + B*Y;
    }
    System.out.println(ans);
  }
}
