import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static  void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
       int a = scanner.nextInt();
       int b = scanner.nextInt();
       int c = scanner.nextInt();
       int x = scanner.nextInt();
       int y = scanner.nextInt();
       int x_y_max = Math.max(x,y);

       int ans = a*x+b*y;
       for(int i = 0; i <= x_y_max*2; i += 2){
           ans = Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans);
           //System.out.println(ans);
       }
       System.out.println(ans);
    }
    public static int check(int z){
        if (z > 0){
            return z;
        }else{
            return 0;
        }
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

    public static  void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
       int a = scanner.nextInt();
       int b = scanner.nextInt();
       int c = scanner.nextInt();
       int x = scanner.nextInt();
       int y = scanner.nextInt();
       int x_y_max = Math.max(x,y);

       int ans = a*x+b*y;
       for(int i = 0; i <= x_y_max*2; i += 2){
           ans = Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans);
           //System.out.println(ans);
       }
       System.out.println(ans);
    }
    public static int check(int z){
        if (z > 0){
            return z;
        }else{
            return 0;
        }
    }
} Main public static  void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
       int a = scanner.nextInt();
       int b = scanner.nextInt();
       int c = scanner.nextInt();
       int x = scanner.nextInt();
       int y = scanner.nextInt();
       int x_y_max = Math.max(x,y);

       int ans = a*x+b*y;
       for(int i = 0; i <= x_y_max*2; i += 2){
           ans = Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans);
           //System.out.println(ans);
       }
       System.out.println(ans);
    } main {
        Scanner scanner = new Scanner(System.in);
       int a = scanner.nextInt();
       int b = scanner.nextInt();
       int c = scanner.nextInt();
       int x = scanner.nextInt();
       int y = scanner.nextInt();
       int x_y_max = Math.max(x,y);

       int ans = a*x+b*y;
       for(int i = 0; i <= x_y_max*2; i += 2){
           ans = Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans);
           //System.out.println(ans);
       }
       System.out.println(ans);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int y = scanner.nextInt(); y scanner.nextInt() scanner.nextInt scanner int x_y_max = Math.max(x,y); x_y_max Math.max(x,y) Math.max Math x y int ans = a*x+b*y; ans a*x+b*y a*x a x b*y b y for(int i = 0; i <= x_y_max*2; i += 2){
           ans = Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans);
           //System.out.println(ans);
       } int i = 0; int i = 0; i 0 i <= x_y_max*2 i x_y_max*2 x_y_max 2 i += 2 i += 2 i 2 {
           ans = Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans);
           //System.out.println(ans);
       } {
           ans = Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans);
           //System.out.println(ans);
       } ans = Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans) ans Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans) Math.min Math a*check(x-i/2) + b*check(y-i/2) + c*i a*check(x-i/2) + b*check(y-i/2) + c*i a*check(x-i/2) a check(x-i/2) check x-i/2 x i/2 i 2 b*check(y-i/2) b check(y-i/2) check y-i/2 y i/2 i 2 c*i c i ans System.out.println(ans) System.out.println System.out System System.out ans String args[] args public static int check(int z){
        if (z > 0){
            return z;
        }else{
            return 0;
        }
    } check {
        if (z > 0){
            return z;
        }else{
            return 0;
        }
    } if (z > 0){
            return z;
        }else{
            return 0;
        } z > 0 z 0 {
            return z;
        } return z; z {
            return 0;
        } return 0; 0 int z z public class Main {

    public static  void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
       int a = scanner.nextInt();
       int b = scanner.nextInt();
       int c = scanner.nextInt();
       int x = scanner.nextInt();
       int y = scanner.nextInt();
       int x_y_max = Math.max(x,y);

       int ans = a*x+b*y;
       for(int i = 0; i <= x_y_max*2; i += 2){
           ans = Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans);
           //System.out.println(ans);
       }
       System.out.println(ans);
    }
    public static int check(int z){
        if (z > 0){
            return z;
        }else{
            return 0;
        }
    }
} public class Main {

    public static  void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
       int a = scanner.nextInt();
       int b = scanner.nextInt();
       int c = scanner.nextInt();
       int x = scanner.nextInt();
       int y = scanner.nextInt();
       int x_y_max = Math.max(x,y);

       int ans = a*x+b*y;
       for(int i = 0; i <= x_y_max*2; i += 2){
           ans = Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans);
           //System.out.println(ans);
       }
       System.out.println(ans);
    }
    public static int check(int z){
        if (z > 0){
            return z;
        }else{
            return 0;
        }
    }
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static  void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
       int a = scanner.nextInt();
       int b = scanner.nextInt();
       int c = scanner.nextInt();
       int x = scanner.nextInt();
       int y = scanner.nextInt();
       int x_y_max = Math.max(x,y);

       int ans = a*x+b*y;
       for(int i = 0; i <= x_y_max*2; i += 2){
           ans = Math.min(a*check(x-i/2) + b*check(y-i/2) + c*i,ans);
           //System.out.println(ans);
       }
       System.out.println(ans);
    }
    public static int check(int z){
        if (z > 0){
            return z;
        }else{
            return 0;
        }
    }
}
