import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        
        int total = 0;
        if( A + B > C * 2 ) {
            int Z = Math.min( X, Y );
            X -= Z;
            Y -= Z;
            total += Z * 2 * C;
        }
        
        if( X > 0 ) {
            int AA = Math.min( A, 2*C );
            total += AA * X;
        }
        
        if( Y > 0 ) {
            int BB = Math.min( B, 2*C );
            total += BB * Y;
        }
        System.out.println(total);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        
        int total = 0;
        if( A + B > C * 2 ) {
            int Z = Math.min( X, Y );
            X -= Z;
            Y -= Z;
            total += Z * 2 * C;
        }
        
        if( X > 0 ) {
            int AA = Math.min( A, 2*C );
            total += AA * X;
        }
        
        if( Y > 0 ) {
            int BB = Math.min( B, 2*C );
            total += BB * Y;
        }
        System.out.println(total);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        
        int total = 0;
        if( A + B > C * 2 ) {
            int Z = Math.min( X, Y );
            X -= Z;
            Y -= Z;
            total += Z * 2 * C;
        }
        
        if( X > 0 ) {
            int AA = Math.min( A, 2*C );
            total += AA * X;
        }
        
        if( Y > 0 ) {
            int BB = Math.min( B, 2*C );
            total += BB * Y;
        }
        System.out.println(total);
    } main {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        
        int total = 0;
        if( A + B > C * 2 ) {
            int Z = Math.min( X, Y );
            X -= Z;
            Y -= Z;
            total += Z * 2 * C;
        }
        
        if( X > 0 ) {
            int AA = Math.min( A, 2*C );
            total += AA * X;
        }
        
        if( Y > 0 ) {
            int BB = Math.min( B, 2*C );
            total += BB * Y;
        }
        System.out.println(total);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc int total = 0; total 0 if( A + B > C * 2 ) {
            int Z = Math.min( X, Y );
            X -= Z;
            Y -= Z;
            total += Z * 2 * C;
        } A + B > C * 2 A + B A B C * 2 C 2 {
            int Z = Math.min( X, Y );
            X -= Z;
            Y -= Z;
            total += Z * 2 * C;
        } int Z = Math.min( X, Y ); Z Math.min( X, Y ) Math.min Math X Y X -= Z X Z Y -= Z Y Z total += Z * 2 * C total Z * 2 * C Z * 2 * C Z 2 C if( X > 0 ) {
            int AA = Math.min( A, 2*C );
            total += AA * X;
        } X > 0 X 0 {
            int AA = Math.min( A, 2*C );
            total += AA * X;
        } int AA = Math.min( A, 2*C ); AA Math.min( A, 2*C ) Math.min Math A 2*C 2 C total += AA * X total AA * X AA X if( Y > 0 ) {
            int BB = Math.min( B, 2*C );
            total += BB * Y;
        } Y > 0 Y 0 {
            int BB = Math.min( B, 2*C );
            total += BB * Y;
        } int BB = Math.min( B, 2*C ); BB Math.min( B, 2*C ) Math.min Math B 2*C 2 C total += BB * Y total BB * Y BB Y System.out.println(total) System.out.println System.out System System.out total String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        
        int total = 0;
        if( A + B > C * 2 ) {
            int Z = Math.min( X, Y );
            X -= Z;
            Y -= Z;
            total += Z * 2 * C;
        }
        
        if( X > 0 ) {
            int AA = Math.min( A, 2*C );
            total += AA * X;
        }
        
        if( Y > 0 ) {
            int BB = Math.min( B, 2*C );
            total += BB * Y;
        }
        System.out.println(total);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        
        int total = 0;
        if( A + B > C * 2 ) {
            int Z = Math.min( X, Y );
            X -= Z;
            Y -= Z;
            total += Z * 2 * C;
        }
        
        if( X > 0 ) {
            int AA = Math.min( A, 2*C );
            total += AA * X;
        }
        
        if( Y > 0 ) {
            int BB = Math.min( B, 2*C );
            total += BB * Y;
        }
        System.out.println(total);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        
        int total = 0;
        if( A + B > C * 2 ) {
            int Z = Math.min( X, Y );
            X -= Z;
            Y -= Z;
            total += Z * 2 * C;
        }
        
        if( X > 0 ) {
            int AA = Math.min( A, 2*C );
            total += AA * X;
        }
        
        if( Y > 0 ) {
            int BB = Math.min( B, 2*C );
            total += BB * Y;
        }
        System.out.println(total);
    }
}
